React
Is new design vision part implemented using new tokens?
React
Is new design vision part implemented using new tokens?
import { Switch } from '@optimus-web/core';
<Switch
checked={checked}
onChange={handleClick}
onBackgroundIcon={IconName.Done}
offBackgroundIcon={IconName.Lock}
/>
Name |
Default |
Description |
---|---|---|
checked |
false |
Makes the switch checked |
onChange |
noop |
Handles the checked status |
disabled? |
false |
Makes the switch disabled |
offBackgroundIcon? |
|
Adds an icon in the right of the switch visible when it's not checked |
onBackgroundIcon? |
|
Adds an icon in the left of the switch visible when it's checked |