Skip to content

Commit

Permalink
Merge pull request #450 from Infineon/449-documentation-switch-update
Browse files Browse the repository at this point in the history
Documentation: switch update
  • Loading branch information
tishoyanchev authored Sep 4, 2023
2 parents 76cedff + a661bcc commit 247f662
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/components/src/components/switch/Usage.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { Meta } from '@storybook/blocks'

import * as SwitchStories from './switch.stories';
Expand All @@ -21,17 +20,22 @@ The switch component allows users to toggle between two mutually exclusive state
- If you have more complex options or a range of values, alternative UI elements like radio buttons, checkboxes, dropdown menus, or sliders might be more suitable.

## Anatomy
<img src={SwitchAnatomy} alt="Switch Anatomy" />
**Switch(1)**
<img src={SwitchAnatomy} alt="Switch Anatomy" width="50%" />

**Switch(1)**\
The main part of the component.

**Switch Action Label (2)**
**Switch Action Label (2)**\
Describes the action which can be done by the user. Since the shwitch should represent the two actions (on/off or yes/no), the action label can also be disabled.

## Mouse interaction
To check the switch, users have two options: they can either directly click on the switch or click on the action label.
<img src={SwitchMouseInteraction} alt="Switch Mouse Interaction" />
<img src={SwitchMouseInteraction} alt="Switch Mouse Interaction" width="50%" />

## States
<img src={SwitchStates} alt="Switch States" />



***
Check out the Figma component: **[Switch](https://www.figma.com/file/zPvPwPgb4EsYFXKC2nhzSG/Infineon-DDS-%7C-Main?type=design&node-id=2582-7342&mode=design&t=OMhbLq483szyJjEo-4)**
***

0 comments on commit 247f662

Please sign in to comment.