Alert.mdx 691 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. name: Alert
  3. menu: Components
  4. ---
  5. import { Playground, Props } from 'docz'
  6. import { Alert } from './Alert'
  7. import { Button, EditButton} from './Alert'
  8. <EditButton />
  9. # Alert
  10. ## Properties
  11. <Props of={Alert} />
  12. ## Basic usage
  13. <Playground>
  14. <Alert>Some message</Alert>
  15. </Playground>
  16. ## Using different kinds
  17. <Playground>
  18. <Alert kind="info">Some message</Alert>
  19. <Alert kind="positive">Some message</Alert>
  20. <Alert kind="negative">Some message</Alert>
  21. <Alert kind="warning">Some message</Alert>
  22. </Playground>
  23. ## Use with children as a function
  24. <Playground>
  25. {() => {
  26. const message = 'Hello world'
  27. return (
  28. <Alert>{message}</Alert>
  29. )
  30. }}
  31. </Playground>