-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3837 from Sage/FE-2818-add-missing-type-definitions
chore: typescript fixes - FE-2818
- Loading branch information
Showing
278 changed files
with
3,474 additions
and
1,757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,22 @@ | ||
import * as React from "react"; | ||
import { SpacingProps } from "../../../utils/helpers/options-helper"; | ||
import { SpaceProps } from "styled-system"; | ||
import { CommonCheckableInputProps } from "../../../__internal__/checkable-input"; | ||
|
||
interface CheckboxProps extends SpacingProps { | ||
checked?: boolean; | ||
disabled?: boolean; | ||
fieldHelp?: React.ReactNode; | ||
labelHelp?: React.ReactNode; | ||
export interface CheckboxProps extends CommonCheckableInputProps, SpaceProps { | ||
/** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */ | ||
adaptiveLabelBreakpoint?: number; | ||
/** If true the Component will be focused when rendered */ | ||
autoFocus?: boolean; | ||
fieldHelpInline?: boolean; | ||
/** Unique Identifier for the input. Will use a randomly generated GUID if none is provided */ | ||
id?: string; | ||
inputWidth?: number | string; | ||
label?: string; | ||
labelWidth?: number | string; | ||
labelSpacing?: 1 | 2; | ||
onChange?: (ev: React.ChangeEvent<HTMLElement>) => void; | ||
onBlur?: (ev: React.ChangeEvent<HTMLElement>) => void; | ||
reverse?: boolean; | ||
size?: string; | ||
value: string; | ||
/* Indicate that error has occurred | ||
Pass string to display icon, tooltip and red border | ||
Pass true boolean to only display red border */ | ||
error?: boolean | string; | ||
/* Indicate that warning has occurred | ||
Pass string to display icon, tooltip and orange border | ||
Pass true boolean to only display orange border */ | ||
warning?: boolean | string; | ||
/* Indicate additional information | ||
Pass string to display icon, tooltip and blue border | ||
Pass true boolean to only display blue border */ | ||
info?: boolean | string; | ||
/** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */ | ||
adaptiveSpacingBreakpoint?: number; | ||
/** Flag to configure component as mandatory */ | ||
required?: boolean; | ||
/** A message that the Help component will display */ | ||
labelHelp?: string | React.ReactNode; | ||
/** Size of the checkbox */ | ||
size?: "small" | "large"; | ||
/** The value of the checkbox, passed on form submit */ | ||
value?: string; | ||
} | ||
|
||
declare const Checkbox: React.ComponentClass<CheckboxProps>; | ||
declare function Checkbox(props: CheckboxProps): JSX.Element; | ||
|
||
export { Checkbox }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { CheckboxGroup } from './checkbox-group'; | ||
export { Checkbox } from './checkbox'; | ||
export { CheckboxGroup } from "./checkbox-group"; | ||
export { Checkbox } from "./checkbox"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.