|
| 1 | +import React from 'react'; |
| 2 | +import { Text } from '.'; |
| 3 | + |
| 4 | +export default { |
| 5 | + title: 'components/Text', |
| 6 | + component: Text, |
| 7 | +}; |
| 8 | + |
| 9 | +// replace the text inside with Text variants when available |
| 10 | +export const Basic = () => ( |
| 11 | + <Text>This is a static template with no bundling</Text> |
| 12 | +); |
| 13 | + |
| 14 | +export const Variants = () => ( |
| 15 | + <> |
| 16 | + <Text variant="body"> |
| 17 | + body is the default variant which inherits color from it's container |
| 18 | + </Text> |
| 19 | + <br /> |
| 20 | + <br /> |
| 21 | + <Text variant="muted"> |
| 22 | + Use muted when you don't want to ask for too much attention |
| 23 | + </Text> |
| 24 | + <br /> |
| 25 | + <br /> |
| 26 | + <Text variant="danger">Now, we really want your atttention, hello!</Text> |
| 27 | + </> |
| 28 | +); |
| 29 | + |
| 30 | +export const Weight = () => ( |
| 31 | + <> |
| 32 | + <Text weight="thin">thin: These are all the weights Inter supports</Text> |
| 33 | + <br /> |
| 34 | + <Text weight="light">light: These are all the weights Inter supports</Text> |
| 35 | + <br /> |
| 36 | + <br /> |
| 37 | + <Text weight="normal"> |
| 38 | + normal (default): Most of our interface uses these 3 sizes |
| 39 | + </Text> |
| 40 | + <br /> |
| 41 | + <Text weight="medium"> |
| 42 | + medium: Most of our interface uses these 3 sizes |
| 43 | + </Text> |
| 44 | + <br /> |
| 45 | + <Text weight="semibold"> |
| 46 | + semibold: Most of our interface uses these 3 sizes |
| 47 | + </Text> |
| 48 | + <br /> |
| 49 | + <br /> |
| 50 | + <Text weight="bold">bold: These are all the weights Inter supports</Text> |
| 51 | + <br /> |
| 52 | + <Text weight="extrabold"> |
| 53 | + extrabold: These are all the weights Inter supports |
| 54 | + </Text> |
| 55 | + <br /> |
| 56 | + <Text weight="black">black: These are all the weights Inter supports</Text> |
| 57 | + <br /> |
| 58 | + </> |
| 59 | +); |
| 60 | + |
| 61 | +export const Size = () => ( |
| 62 | + <Text size={3}>Takes the size from fontSizes tokens</Text> |
| 63 | +); |
| 64 | + |
| 65 | +export const Align = () => ( |
| 66 | + <Text as="div" align="right"> |
| 67 | + sometimes, just sometimes you need to align right |
| 68 | + </Text> |
| 69 | +); |
0 commit comments