import { Meta, Story, Props, Preview } from '@storybook/addon-docs/blocks';

import Switch from './Switch';

<Meta title="Data Entry|Switch" component={Switch} />

# Switch

Switching Selector.

## When To Use

- If you need to represent the switching between two states or on-off state.
- The difference between `Switch` and `Checkbox` is that `Switch` will trigger a state change directly when you toggle it, while `Checkbox` is generally used for state marking, which should work in conjunction with submit operation.

<Preview>
  <Story name="Index">
    <Switch defaultChecked />
  </Story>
</Preview>

#### Props

<Props of={Switch} />
