-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67cd4b8
commit ab20bb9
Showing
9 changed files
with
40 additions
and
100 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
10 changes: 2 additions & 8 deletions
10
packages/design-system/src/components/Form/ToggleSwitch/ToggleSwitch.tsx
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,19 +1,13 @@ | ||
import { forwardRef, Ref } from 'react'; | ||
|
||
import { Mandatory } from '../../../types'; | ||
import ToggleSwitchPrimitive, { | ||
ToggleSwitchPrimitiveType, | ||
} from './Primitive/ToggleSwitchPrimitive'; | ||
|
||
export type ToggleSwitchProps = Mandatory< | ||
Omit<ToggleSwitchPrimitiveType, 'className' | 'style'>, | ||
'onChange' | ||
>; | ||
export type ToggleSwitchProps = Omit<ToggleSwitchPrimitiveType, 'className' | 'style'>; | ||
|
||
const ToggleSwitch = forwardRef((props: ToggleSwitchProps, ref: Ref<HTMLInputElement>) => { | ||
export const ToggleSwitch = forwardRef((props: ToggleSwitchProps, ref: Ref<HTMLInputElement>) => { | ||
return <ToggleSwitchPrimitive {...props} ref={ref} />; | ||
}); | ||
|
||
ToggleSwitch.displayName = 'ToggleSwitch'; | ||
|
||
export default ToggleSwitch; |
23 changes: 0 additions & 23 deletions
23
packages/design-system/src/components/Form/ToggleSwitch/UncontrolledToggleSwitch.tsx
This file was deleted.
Oops, something went wrong.
5 changes: 1 addition & 4 deletions
5
packages/design-system/src/components/Form/ToggleSwitch/index.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 |
---|---|---|
@@ -1,4 +1 @@ | ||
import ToggleSwitch from './ToggleSwitch'; | ||
import UncontrolledToggleSwitch from './UncontrolledToggleSwitch'; | ||
|
||
export { ToggleSwitch, UncontrolledToggleSwitch }; | ||
export { ToggleSwitch } from './ToggleSwitch'; |
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
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