File tree Expand file tree Collapse file tree 3 files changed +4
-11
lines changed
src/Shared/Components/Switch Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,6 @@ import { IconBaseColorType } from '@Shared/types'
33
44import { DTSwitchProps } from './types'
55
6- export const SWITCH_VARIANTS : Readonly < Record < DTSwitchProps [ 'variant' ] , null > > = {
7- theme : null ,
8- positive : null ,
9- }
10-
11- export const SWITCH_SHAPES : Readonly < Record < DTSwitchProps [ 'shape' ] , null > > = {
12- rounded : null ,
13- square : null ,
14- }
15-
166export const ROUNDED_SWITCH_SIZE_MAP : Readonly < Record < DTSwitchProps [ 'size' ] , string > > = {
177 [ ComponentSizeType . medium ] : 'w-32' ,
188 [ ComponentSizeType . small ] : 'w-24' ,
Original file line number Diff line number Diff line change 1- export { SWITCH_SHAPES , SWITCH_VARIANTS } from './constants'
21export { default as DTSwitch } from './Switch.component'
32export type { DTSwitchProps } from './types'
Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ export type DTSwitchProps = {
9292 */
9393 size ?: Extract < ComponentSizeType , ComponentSizeType . medium | ComponentSizeType . small >
9494
95+ /**
96+ * Callback function that is called when the switch state changes.
97+ * This function should handle the logic for toggling the switch.
98+ */
9599 onChange : ( ) => void
96100
97101 /**
You can’t perform that action at this time.
0 commit comments