icons.stories.tsx 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import styled from '@emotion/styled'
  2. import { Meta, StoryFn } from '@storybook/react'
  3. import { Text } from '@/components/Text'
  4. import { cVar } from '@/styles'
  5. import * as icons from './index'
  6. export default {
  7. title: 'Icons/Icons',
  8. } as Meta
  9. const Template: StoryFn = () => (
  10. <Container>
  11. {Object.entries(icons).map(([iconName, Component]) => {
  12. return (
  13. <Item key={iconName}>
  14. <Component />
  15. <Text as="span" color="colorText" variant="t100">
  16. {iconName}
  17. </Text>
  18. </Item>
  19. )
  20. })}
  21. </Container>
  22. )
  23. export const Default = Template.bind({})
  24. Default.args = {}
  25. const Container = styled.div`
  26. display: grid;
  27. grid-template-columns: repeat(auto-fill, minmax(200px, max-content));
  28. flex-wrap: wrap;
  29. padding: 50px 0;
  30. justify-content: center;
  31. `
  32. const Item = styled.div`
  33. border: 1px solid ${cVar('colorCoreNeutral700')};
  34. flex: 1;
  35. padding: 32px 0;
  36. text-align: center;
  37. svg {
  38. margin: 0 auto;
  39. margin-bottom: 8px;
  40. }
  41. `