-
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 #4322 from Sage/FE-3370-refactor-form-field-based-…
…inputs refactor(all-inputs): refactor form-field based inputs - FE-3370
- Loading branch information
Showing
73 changed files
with
942 additions
and
621 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// component preview locators | ||
const SWITCH_DATA_COMPONENT = '[data-component="Switch"]'; | ||
const SWITCH_DATA_COMPONENT = '[data-component="switch"]'; | ||
|
||
export default SWITCH_DATA_COMPONENT; |
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
42 changes: 42 additions & 0 deletions
42
src/__internal__/checkable-input/hidden-checkable-input.d.ts
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as React from "react"; | ||
|
||
export interface CommonHiddenCheckableInputProps | ||
extends Omit< | ||
React.InputHTMLAttributes<HTMLInputElement>, | ||
"value" | "size" | "type" | ||
> { | ||
/** If true the Component will be focused when page load */ | ||
autoFocus?: boolean; | ||
/** Checked state of the input */ | ||
checked?: boolean; | ||
/** Input name */ | ||
name?: string; | ||
/** OnChange event handler */ | ||
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void; | ||
/** OnFocus event handler */ | ||
onFocus?: (ev: React.FocusEvent<HTMLInputElement>) => void; | ||
/** Blur event handler */ | ||
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void; | ||
/** OnMouseLeave event handler */ | ||
onMouseLeave?: (ev: React.MouseEvent<HTMLInputElement>) => void; | ||
/** OnMouseEnter event handler */ | ||
onMouseEnter?: (ev: React.MouseEvent<HTMLInputElement>) => void; | ||
/** Value of the input */ | ||
value?: string; | ||
/** A callback to retrieve the input reference */ | ||
inputRef: React.Ref<HTMLInputElement>; | ||
} | ||
|
||
export interface HiddenCheckableInputProps | ||
extends CommonHiddenCheckableInputProps { | ||
/** HTML type attribute of the input */ | ||
type: string; | ||
/** Element id for aria-describedby */ | ||
helpId?: string; | ||
} | ||
|
||
declare function HiddenCheckableInput( | ||
props: HiddenCheckableInputProps | ||
): JSX.Element; | ||
|
||
export default HiddenCheckableInput; |
Oops, something went wrong.