forked from rebassjs/rebass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
367 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import { StyleProvider, ScrollTop } from 'mdx-go' | ||
import { | ||
Box, | ||
Flex, | ||
Text, | ||
Heading, | ||
Link, | ||
Button, | ||
Image, | ||
Card | ||
} from '../src' | ||
|
||
export const Root = props => | ||
<StyleProvider> | ||
<Box | ||
mx='auto' | ||
px={4} | ||
py={4} | ||
css={{ | ||
maxWidth: '768px' | ||
}}> | ||
{props.children} | ||
</Box> | ||
<ScrollTop /> | ||
</StyleProvider> | ||
|
||
|
||
# Rebass v3 | ||
|
||
8 primitive UI components built with styled-system. | ||
|
||
- [Box](#box) | ||
- [Flex](#flex) | ||
- [Text](#text) | ||
- [Heading](#heading) | ||
- [Link](#link) | ||
- [Button](#button) | ||
- [Image](#image) | ||
- [Card](#card) | ||
|
||
## Box | ||
|
||
<Box | ||
p={3} | ||
color='white' | ||
bg='magenta'> | ||
Box | ||
</Box> | ||
|
||
## Flex | ||
|
||
<Flex> | ||
<Box | ||
p={3} | ||
width={1/2} | ||
color='magenta' | ||
bg='cyan'> | ||
Flex | ||
</Box> | ||
<Box | ||
p={3} | ||
width={1/2} | ||
color='white' | ||
bg='magenta'> | ||
Box | ||
</Box> | ||
</Flex> | ||
|
||
## Text | ||
|
||
<Text>Text</Text> | ||
<Text fontSize={[ 3, 4, 5 ]}>Large Text</Text> | ||
<Text fontSize={0}>Small Text</Text> | ||
<Text fontWeight='bold'>Bold Text</Text> | ||
|
||
## Heading | ||
|
||
<Heading>Hello</Heading> | ||
|
||
<Text is='h1'>Text is h1</Text> | ||
<Heading is='h1'>Heading is h1</Heading> | ||
|
||
<Box bg='tomato'> | ||
<Heading.h1>Hello h1</Heading.h1> | ||
<Heading.h2>Hello h2</Heading.h2> | ||
<Heading.h3>Hello h3</Heading.h3> | ||
<Heading.h4>Hello h4</Heading.h4> | ||
</Box> | ||
|
||
## Link | ||
|
||
<Link href='https://rebassjs.org'>Link</Link> | ||
|
||
## Button | ||
|
||
<Button>Button</Button> | ||
|
||
## Image | ||
|
||
<Image | ||
src='https://source.unsplash.com/random/1280x720' | ||
borderRadius={8} | ||
/> | ||
|
||
## Card | ||
|
||
<Card | ||
fontSize={6} | ||
fontWeight='bold' | ||
p={5} | ||
my={5} | ||
bg='#f6f6ff' | ||
borderRadius={8} | ||
boxShadow='0 2px 16px rgba(0, 0, 0, 0.25)' | ||
> | ||
Card | ||
</Card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.