Button.mdx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ---
  2. name: Button
  3. menu: Components
  4. ---
  5. import { Playground, Props } from 'docz'
  6. import { Button, EditButton} from './Button'
  7. <EditButton />
  8. Buttons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them.
  9. ### Best practices
  10. - Group buttons logically into sets based on usage and importance.
  11. - Ensure that button actions are clear and consistent.
  12. - The main action of a group set can be a primary button.
  13. - Select a single button variation and do not mix them.
  14. ## Properties
  15. <Props of={Button} />
  16. ## Basic usage
  17. <Playground>
  18. <Button>Click me</Button>
  19. </Playground>
  20. ## With different sizes
  21. <Playground>
  22. <Button scale="small">Click me</Button>
  23. <Button scale="normal">Click me</Button>
  24. <Button scale="big">Click me</Button>
  25. </Playground>
  26. ## With different colors
  27. <Playground>
  28. <Button kind="primary">Click me</Button>
  29. <Button kind="secondary">Click me</Button>
  30. <Button kind="cancel">Click me</Button>
  31. <Button kind="dark">Click me</Button>
  32. <Button kind="gray">Click me</Button>
  33. </Playground>
  34. ## Outlined
  35. <Playground>
  36. <Button kind="primary" outline>Click me</Button>
  37. <Button kind="secondary" outline>Click me</Button>
  38. <Button kind="cancel" outline>Click me</Button>
  39. <Button kind="dark" outline>Click me</Button>
  40. <Button kind="gray" outline>Click me</Button>
  41. </Playground>