├── .babelrc
├── .eslintrc.js
├── .github
├── CONTRIBUTING.md
└── LICENSE.md
├── .gitignore
├── .nojekyll
├── .npmignore
├── .npmrc
├── .travis.yml
├── CHANGELOG.md
├── README.md
├── docs
├── _app.js
├── _constants.js
├── _scope.js
├── colors.js
├── components
│ ├── Absolute.md
│ ├── Arrow.md
│ ├── Avatar.md
│ ├── Badge.md
│ ├── Banner.md
│ ├── Blockquote.md
│ ├── Border.md
│ ├── Box.md
│ ├── Button.md
│ ├── ButtonCircle.md
│ ├── ButtonOutline.md
│ ├── ButtonTransparent.md
│ ├── Caps.md
│ ├── Card.md
│ ├── Circle.md
│ ├── Close.md
│ ├── Code.md
│ ├── Column.md
│ ├── Container.md
│ ├── Divider.md
│ ├── Dot.md
│ ├── Drawer.md
│ ├── Flex.md
│ ├── Heading.md
│ ├── Hide.md
│ ├── Image.md
│ ├── Label.md
│ ├── Lead.md
│ ├── Measure.md
│ ├── Message.md
│ ├── Modal.md
│ ├── Panel.md
│ ├── Position.md
│ ├── Pre.md
│ ├── Progress.md
│ ├── Provider.md
│ ├── Relative.md
│ ├── Row.md
│ ├── Small.md
│ ├── Subhead.md
│ ├── Tab.md
│ ├── Tabs.md
│ ├── Text.md
│ ├── Truncate.md
│ └── list.md
├── extending.md
├── getting-started.md
├── index.js
├── props.md
└── theming.md
├── examples
├── .DS_Store
├── app
│ ├── .babelrc
│ ├── .gitignore
│ ├── .watchmanconfig
│ ├── App.js
│ ├── IndexScreen.js
│ ├── RootStack.js
│ ├── app.json
│ ├── assets
│ │ ├── fonts
│ │ │ └── SpaceMono-Regular.ttf
│ │ ├── icon.png
│ │ └── splash.png
│ ├── package.json
│ └── screens
│ │ ├── AbsoluteScreen.js
│ │ ├── ArrowScreen.js
│ │ ├── AvatarScreen.js
│ │ ├── BadgeScreen.js
│ │ ├── BannerScreen.js
│ │ ├── BlockquoteScreen.js
│ │ ├── BorderScreen.js
│ │ ├── BoxScreen.js
│ │ ├── ButtonCircleScreen.js
│ │ ├── ButtonOutlineScreen.js
│ │ ├── ButtonScreen.js
│ │ ├── ButtonTransparentScreen.js
│ │ ├── CapsScreen.js
│ │ ├── CardScreen.js
│ │ ├── CircleScreen.js
│ │ ├── CloseScreen.js
│ │ ├── CodeScreen.js
│ │ ├── ColumnScreen.js
│ │ ├── ContainerScreen.js
│ │ ├── DividerScreen.js
│ │ ├── DotScreen.js
│ │ ├── DrawerScreen.js
│ │ ├── FlexScreen.js
│ │ ├── HeadingScreen.js
│ │ ├── HideScreen.js
│ │ ├── ImageScreen.js
│ │ ├── LabelScreen.js
│ │ ├── LeadScreen.js
│ │ ├── MeasureScreen.js
│ │ ├── MessageScreen.js
│ │ ├── ModalScreen.js
│ │ ├── PanelScreen.js
│ │ ├── PositionScreen.js
│ │ ├── PreScreen.js
│ │ ├── ProgressScreen.js
│ │ ├── ProviderScreen.js
│ │ ├── RelativeScreen.js
│ │ ├── RowScreen.js
│ │ ├── SmallScreen.js
│ │ ├── SubheadScreen.js
│ │ ├── TabScreen.js
│ │ ├── TabsScreen.js
│ │ ├── TextScreen.js
│ │ └── TruncateScreen.js
└── jsx
│ ├── .DS_Store
│ ├── Absolute.jsx
│ ├── Arrow.jsx
│ ├── Avatar.jsx
│ ├── Badge.jsx
│ ├── Banner.jsx
│ ├── Blockquote.jsx
│ ├── Border.jsx
│ ├── Box.jsx
│ ├── Button.jsx
│ ├── ButtonCircle.jsx
│ ├── ButtonOutline.jsx
│ ├── ButtonTransparent.jsx
│ ├── Caps.jsx.js
│ ├── Card.jsx
│ ├── Circle.jsx
│ ├── Close.jsx
│ ├── Code.jsx
│ ├── Column.jsx
│ ├── Container.jsx
│ ├── Divider.jsx
│ ├── Donut.jsx
│ ├── Dot.jsx
│ ├── Drawer.jsx
│ ├── Flex.jsx
│ ├── Heading.jsx
│ ├── Hide.jsx
│ ├── Image.jsx
│ ├── Label.jsx
│ ├── Lead.jsx
│ ├── Measure.jsx
│ ├── Message.jsx
│ ├── Modal.jsx
│ ├── Panel.jsx
│ ├── Position.jsx
│ ├── Pre.jsx
│ ├── Progress.jsx
│ ├── Row.jsx
│ ├── Small.jsx
│ ├── Subhead.jsx
│ ├── Tab.jsx
│ ├── Tabs.jsx
│ ├── Text.jsx
│ └── Truncate.jsx
├── generate-examples.js
├── package.json
└── src
├── Arrow.js
├── Avatar.js
├── Badge.js
├── Banner.js
├── Blockquote.js
├── Border.js
├── Box.js
├── Button.js
├── ButtonCircle.js
├── ButtonOutline.js
├── ButtonTransparent.js
├── Caps.js
├── Card.js
├── Circle.js
├── Close.js
├── Code.js
├── Column.js
├── Container.js
├── Divider.js
├── Dot.js
├── Drawer.js
├── Heading.js
├── Hide.js
├── Image.js
├── Label.js
├── Lead.js
├── Measure.js
├── Message.js
├── Modal.js
├── Panel.js
├── Position.js
├── Pre.js
├── Progress.js
├── Provider.js
├── Row.js
├── Small.js
├── Subhead.js
├── Tab.js
├── Tabs.js
├── Text.js
├── Truncate.js
├── colors.js
├── index.js
└── theme.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "env",
4 | "stage-0",
5 | "react"
6 | ],
7 | "env": {
8 | "emotion": {
9 | "plugins": [
10 | [
11 | "transform-rename-import",
12 | {
13 | "replacements": [
14 | {
15 | "original": "^native-system-components$",
16 | "replacement": "native-system-components/emotion"
17 | },
18 | {
19 | "original": "^styled-components$",
20 | "replacement": "emotion-theming"
21 | },
22 | {
23 | "original": "^native-grid-styled$",
24 | "replacement": "native-grid-styled/emotion"
25 | }
26 | ]
27 | }
28 | ]
29 | ]
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extends": ["standard", "standard-react"]
3 | };
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
2 | # Contributing
3 |
4 | Issues and pull requests are welcome.
5 |
6 | Please **be nice** and read the following before contributing.
7 |
8 | - Test before submitting pull requests - `npm test`
9 |
10 | ## Codebase Overview
11 |
12 | Folders:
13 | - `/src` source code
14 | - `/tests` tests, including snapshots
15 | - `/docs` source for the documentation/demo site
16 |
17 | ### Source Code
18 |
19 | All exports are handled in `src/index.js`.
20 | Each component is its own module in the `src/` folder.
21 | Be sure to familiarize yourself with
22 | [styled-system](https://github.com/jxnblk/styled-system)
23 | before making changes.
24 |
25 |
26 | ### Tests
27 |
28 | Tests are written using Ava. Please ensure to test any new code added, and update snapshots when relevant.
29 |
--------------------------------------------------------------------------------
/.github/LICENSE.md:
--------------------------------------------------------------------------------
1 |
2 | # The MIT License (MIT)
3 | Copyright (c) 2015 – 2018 Brent Jackson
4 | Copyright (c) 2018 Herman Starikov
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 |
8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 |
10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 |
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | package-lock.json
3 | dist
4 | coverage
5 | .nyc_output
6 | .site
7 | site
8 |
--------------------------------------------------------------------------------
/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hermanya/rebass-native/02bbda144120cff1cfcbc20dff5f5a4ac6ef8dec/.nojekyll
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | docs
2 | site
3 | test
4 | coverage
5 | .nyc_output
6 | .site
7 | create-rebass
8 | examples
9 | markdown
10 | mdx
11 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
2 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 10
4 | after_success:
5 | - npm run cover
6 | before_deploy:
7 | - npm install
8 | - npm run build
9 | deploy:
10 | provider: pages
11 | skip_cleanup: true
12 | github_token: $GH_TOKEN
13 | local_dir: site
14 | on:
15 | branch: master
16 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 |
2 | # Changelog
3 |
4 | ## [2.0.0] 2018-06-24
5 |
6 | ### Added
7 |
8 | - Support for [emotion][emotion]
9 |
10 | ### Changed
11 |
12 | - [styled-system](https://github.com/jxnblk/styled-system) v2
13 | - [native-grid-styled](https://github.com/hermanya/native-grid-styled) v4
14 | - Moves components to separate modules
15 | - Uses [native-system-components](https://github.com/jxnblk/styled-system/tree/master/native-system-components)
16 | - Updates docs site
17 |
18 | #### Breaking
19 |
20 | - Renamed components
21 | - TabItem -> Tab
22 | - DotButton -> Dot
23 | - PanelHeader -> Panel.Header
24 | - PanelFooter -> Panel.Footer
25 | - Default theme (changed to match styled-system)
26 | - The `colors` object no longer uses Palx
27 | - Array color values have been removed
28 | - `radius` has been replaced with `radii`
29 | - `font` has been replaced with `fonts`
30 | - `monospace` has been removed
31 | - Theme fields are no longer exposed as exports
32 | - Props
33 | - `width` is only available on Flex and Box
34 | - `fontSize` is only available on typographic components
35 | - `direction` is now `flexDirection`
36 | - Flex `align` is now `alignItems`
37 | - Flex `justify` is now `justifyContent`
38 | - Flex `wrap` is now `flexWrap`
39 | - Arrow `up` is now `direction='up'`
40 | - `active` props have been removed in favor of custom styles
41 | - Border now uses [styled-system border props](https://github.com/jxnblk/styled-system#borders)
42 | - Banner `image` is now `backgroundImage`
43 | - Absolute, Fixed, Relative, and Sticky now require values for `top`, `right`, `bottom`, and `left` props
44 | - Drawer `position` prop has been renamed to `side`
45 | - Drawer `size` prop has been replaced with `width` and `height` props
46 |
47 | ### Removed
48 |
49 | - Custom HOC `hoc`
50 | - `createLibrary` function
51 | - `util`
52 | - `createComponent`
53 | - Palx dependency
54 | - ScrollCarousel component
55 | - CarouselSlide component
56 | - Star comonent
57 |
58 |
59 | [emotion]: https://github.com/emotion-js/emotion
60 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Rebass-native
2 |
3 | Port of [Rebass](https://github.com/jxnblk/rebass) for react-native, a UI component library & design system,
4 | built with [styled-system][system],
5 | with support for
6 | [styled-components][sc].
7 |
8 | [![Build Status][badge]][travis]
9 | [![Coverage][coverage-badge]][coverage]
10 | [![Downloads][downloads-badge]][npm]
11 | [![Version][version-badge]][npm]
12 |
13 | [badge]: https://img.shields.io/travis/Hermanya/rebass-native.svg?style=flat-square
14 | [travis]: https://travis-ci.org/Hermanya/rebass-native
15 | [coverage-badge]: https://img.shields.io/codecov/c/github/hermanya/rebass-native.svg?style=flat-square
16 | [coverage]: https://codecov.io/github/hermanya/rebass-native
17 |
18 | [downloads-badge]: https://img.shields.io/npm/dw/rebass-native.svg?style=flat-square
19 | [version-badge]: https://img.shields.io/npm/v/rebass-native.svg?style=flat-square
20 | [npm]: https://npmjs.com/package/rebass-native
21 |
22 |
23 | ```sh
24 | npm i rebass-native
25 | ```
26 |
27 | [See Demo](https://snack.expo.io/@git/github.com/hermanya/rebass-native:examples/app)
28 |
29 | Rebass-native is a port of Rebass, a library of highly-composable, primitive UI components for React,
30 | built with styled-components to keep styles isolated and reduce the need to write custom Styles in your application.
31 | Based upon a configurable design system,
32 | Rebass‘s props API makes building consistent, responsive web apps simpler and faster.
33 |
34 |
35 | ## Getting Started
36 |
37 | ```jsx
38 | import React from 'react'
39 | import { Provider, Heading, Button } from 'rebass-native'
40 |
41 | const App = props => (
42 |
43 | Hello
44 |
45 |
46 | )
47 | ```
48 |
49 | ## Features
50 |
51 | - Kickstart your own react-native component library
52 | - Responsive style props from [styled-system][system]
53 | - Flexbox grid with [native-grid-styled][gs]
54 | - Support for [styled-components][sc]
55 | - Functional stateless UI components
56 | - Configurable theming
57 | - Extensible base components
58 | - Design-system based consistency
59 | - Built for responsive web design
60 |
61 | ## Documentation
62 |
63 | - [Docs](https://hermanya.github.io/rebass-native)
64 | - [Getting Started](https://hermanya.github.io/rebass-native/getting-started)
65 | - [Props](https://hermanya.github.io/rebass-native/props)
66 | - [Grid System](https://hermanya.github.io/rebass-native/grid-system)
67 | - [Theming](https://hermanya.github.io/rebass-native/theming)
68 | - [Extending](https://hermanya.github.io/rebass-native/extending)
69 | - [Components](https://hermanya.github.io/rebass-native/components)
70 |
71 | ## CodeSandbox
72 |
73 | Try it out:
74 |
75 | https://snack.expo.io/@git/github.com/hermanya/rebass-native:examples/app
76 |
77 | ### Architectural Approach
78 |
79 | Rebass is built around a component architectural approach inspired by Dan Abramov’s
80 | [Presentational and Container Components](https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0#.ah4312963),
81 | where presentational components are the only ones that encapsulate styles and contain no application logic,
82 | and container components do not contain any styles or DOM markup and handle all the application logic.
83 |
84 | Rebass only contains presentational components,
85 | which means controlling things like progressive disclosure mechanisms
86 | or dropdown menus should be handled at a higher level in container components.
87 | Therefore, Rebass itself does not require any client-side JavaScript,
88 | is well suited to server-side rendering,
89 | and can fit into virtually any higher level application architecture.
90 |
91 | See [Patterns for Style Composition in React](http://jxnblk.com/writing/posts/patterns-for-style-composition-in-react/)
92 | for more on some of the thought behind Rebass.
93 |
94 |
95 | ### Related
96 |
97 | - [styled-system][system]
98 | - [native-grid-styled][gs]
99 | - [styled-components][sc]
100 |
101 | [system]: https://github.com/jxnblk/styled-system
102 | [gs]: https://github.com/hermanya/native-grid-styled
103 | [sc]: https://github.com/styled-components/styled-components
104 |
105 | ---
106 |
107 | [Contributing](.github/CONTRIBUTING.md)
108 | |
109 | [MIT License](.github/LICENSE.md)
110 |
--------------------------------------------------------------------------------
/docs/_app.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Provider as RefunkProvider } from 'refunk'
3 | import {
4 | SidebarLayout,
5 | ScopeProvider
6 | } from '@compositor/x0/components'
7 | import sortBy from 'lodash.sortby'
8 | import pkg from '../package.json'
9 | import * as Rebass from '../src'
10 | import { photo } from './_constants'
11 |
12 | const scope = {
13 | ...Rebass,
14 | photo
15 | }
16 |
17 | const navOrder = [
18 | 'Rebass',
19 | 'getting-started',
20 | 'props',
21 | 'grid-system',
22 | 'theming',
23 | 'extending',
24 | 'server-side-rendering',
25 | 'colors',
26 | 'components'
27 | ]
28 |
29 | const createNav = routes => [
30 | ...sortBy([...routes]
31 | .map(route => {
32 | if (route.name !== 'index') return route
33 | return {
34 | ...route,
35 | name: 'Components',
36 | path: '/components'
37 | }
38 | }), a => {
39 | const index = navOrder.indexOf(a.name)
40 | return index < 0 ? Infinity : index
41 | }),
42 | {
43 | key: 'github',
44 | name: 'GitHub',
45 | path: 'https://github.com/hermanya/rebass-native'
46 | },
47 | {
48 | key: 'rebass',
49 | name: 'Rebass for web',
50 | path: 'https://github.com/jxnblk/rebass'
51 | },
52 | {
53 | key: 'jxnblk',
54 | name: 'Based on work of Jxnblk',
55 | path: 'https://jxnblk.com'
56 | }
57 | ]
58 |
59 | export default class extends React.Component {
60 | render () {
61 | const {
62 | routes,
63 | route,
64 | children
65 | } = this.props
66 | const nav = createNav(routes)
67 |
68 | const disableLayout = route && route.props && route.props.layout === false
69 |
70 | return (
71 |
72 |
73 |
74 | {disableLayout ? (
75 | children
76 | ) : (
77 |
82 | )}
83 |
84 |
85 |
86 | )
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/docs/_constants.js:
--------------------------------------------------------------------------------
1 | export const photo = 'https://images.unsplash.com/photo-1462331940025-496dfbfc7564?w=2048&q=20'
2 | export const docs = '/getting-started'
3 | export const install = 'npm i rebass-native'
4 |
--------------------------------------------------------------------------------
/docs/_scope.js:
--------------------------------------------------------------------------------
1 | export * from '../src'
2 |
--------------------------------------------------------------------------------
/docs/colors.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { scope } from '@compositor/x0/components'
3 | import {
4 | Box,
5 | Flex,
6 | Heading,
7 | Text,
8 | Code,
9 | Pre,
10 | colors
11 | } from 'rebass'
12 |
13 | const {
14 | h1: Title,
15 | p: P,
16 | a: Link
17 | } = scope
18 |
19 | const keys = Object.keys(colors)
20 |
21 | export default props =>
22 |
23 |
24 | Built-in Colors
25 |
26 |
27 | The default theme in Rebass includes {keys.length} colors to help get you started.
28 | Theming can be completely customized using the Provider component.
29 |
45 |
46 | ))}
47 |
48 |
49 |
--------------------------------------------------------------------------------
/docs/components/Absolute.md:
--------------------------------------------------------------------------------
1 | # Absolute
2 |
3 | ```.jsx
4 |
5 |
6 | Hello
7 |
8 |
9 |
10 | ```
11 |
12 |
13 |
14 | Extends: [Position](/components/Position) > [Box](/components/Box) > [Box](/components/Box)
--------------------------------------------------------------------------------
/docs/components/Arrow.md:
--------------------------------------------------------------------------------
1 | # Arrow
2 |
3 | ```.jsx
4 |
5 |
6 | ```
7 |
8 |
9 |
10 | prop | default | theme key
11 | ---|---|---
12 | m | | space
13 | mt | | space
14 | mr | | space
15 | mb | | space
16 | ml | | space
17 | mx | | space
18 | my | | space
19 | p | | space
20 | pt | | space
21 | pr | | space
22 | pb | | space
23 | pl | | space
24 | px | | space
25 | py | | space
26 | color | | colors
27 | bg | | colors
--------------------------------------------------------------------------------
/docs/components/Avatar.md:
--------------------------------------------------------------------------------
1 | # Avatar
2 |
3 | ```.jsx
4 |
8 |
9 | ```
10 |
11 |
12 |
13 | Extends: [Image](/components/Image) > [Image](/components/Image)
14 |
15 | prop | default | theme key
16 | ---|---|---
17 | size | 48 | N/A
18 | borderRadius | 99999px | radii
19 | m | | space
20 | mt | | space
21 | mr | | space
22 | mb | | space
23 | ml | | space
24 | mx | | space
25 | my | | space
26 | p | | space
27 | pt | | space
28 | pr | | space
29 | pb | | space
30 | pl | | space
31 | px | | space
32 | py | | space
33 | color | | colors
34 | bg | | colors
--------------------------------------------------------------------------------
/docs/components/Badge.md:
--------------------------------------------------------------------------------
1 | # Badge
2 |
3 | ```.jsx
4 |
5 | Hello
6 |
7 | Beep
8 |
9 |
10 |
11 | ```
12 |
13 |
14 |
15 | Extends: [Box](/components/Box) > [Box](/components/Box)
16 |
17 | prop | default | theme key
18 | ---|---|---
19 | m | | space
20 | mt | | space
21 | mr | | space
22 | mb | | space
23 | ml | | space
24 | mx | 1 | space
25 | my | | space
26 | p | | space
27 | pt | | space
28 | pr | | space
29 | pb | | space
30 | pl | | space
31 | px | 2 | space
32 | py | 1 | space
33 | color | | colors
34 | bg | blue | colors
35 | borderRadius | 2 | radii
--------------------------------------------------------------------------------
/docs/components/Banner.md:
--------------------------------------------------------------------------------
1 | # Banner
2 |
3 | ```.jsx
4 |
7 |
9 | Hello
10 |
11 |
12 |
13 | ```
14 |
15 |
16 |
17 | Extends: [Flex](/components/Flex) > [Box](/components/Box)
18 |
19 | prop | default | theme key
20 | ---|---|---
21 | m | | space
22 | mt | | space
23 | mr | | space
24 | mb | | space
25 | ml | | space
26 | mx | | space
27 | my | | space
28 | p | 3 | space
29 | pt | | space
30 | pr | | space
31 | pb | | space
32 | pl | | space
33 | px | | space
34 | py | | space
35 | flexDirection | column | N/A
36 | alignItems | center | N/A
37 | justifyContent | center | N/A
38 | minHeight | 100 | minHeights
39 | color | | colors
40 | bg | black | colors
41 | backgroundSize | | N/A
42 | backgroundPosition | | N/A
43 | backgroundImage | | N/A
--------------------------------------------------------------------------------
/docs/components/Blockquote.md:
--------------------------------------------------------------------------------
1 | # Blockquote
2 |
3 | ```.jsx
4 |
5 | “The simplest scale is a single note, and sticking with a single note draws more attention to other parameters, such as rhythm and inflection.”
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Box](/components/Box) > [Box](/components/Box)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | m | | space
17 | mt | | space
18 | mr | | space
19 | mb | | space
20 | ml | | space
21 | mx | | space
22 | my | | space
23 | p | | space
24 | pt | | space
25 | pr | | space
26 | pb | | space
27 | pl | 2 | space
28 | px | | space
29 | py | | space
30 | borderColor | blue | colors
--------------------------------------------------------------------------------
/docs/components/Border.md:
--------------------------------------------------------------------------------
1 | # Border
2 |
3 | ```.jsx
4 |
6 | Hello
7 |
8 |
9 | ```
10 |
11 |
12 |
13 | Extends: [Box](/components/Box) > [Box](/components/Box)
14 |
15 | prop | default | theme key
16 | ---|---|---
17 | borderColor | gray | colors
18 | m | | space
19 | mt | | space
20 | mr | | space
21 | mb | | space
22 | ml | | space
23 | mx | | space
24 | my | | space
25 | p | | space
26 | pt | | space
27 | pr | | space
28 | pb | | space
29 | pl | | space
30 | px | | space
31 | py | | space
32 | width | | N/A
33 | color | | colors
34 | bg | | colors
--------------------------------------------------------------------------------
/docs/components/Box.md:
--------------------------------------------------------------------------------
1 | # Box
2 |
3 | ```.jsx
4 |
9 | Hello
10 |
11 |
12 | ```
13 |
14 |
15 |
16 | Extends: [Box](http://jxnblk.com/rebass/components/Box)
--------------------------------------------------------------------------------
/docs/components/Button.md:
--------------------------------------------------------------------------------
1 | # Button
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Box](/components/Box)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | m | | space
17 | mt | | space
18 | mr | | space
19 | mb | | space
20 | ml | | space
21 | mx | | space
22 | my | | space
23 | p | | space
24 | pt | | space
25 | pr | | space
26 | pb | | space
27 | pl | | space
28 | px | 3 | space
29 | py | 2 | space
30 | color | | colors
31 | bg | blue | colors
32 | borderRadius | 2 | radii
33 | border | | borders
34 | borderTop | | borders
35 | borderRight | | borders
36 | borderBottom | | borders
37 | borderLeft | | borders
38 | justifyContent | center | N/A
--------------------------------------------------------------------------------
/docs/components/ButtonCircle.md:
--------------------------------------------------------------------------------
1 | # ButtonCircle
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Button](/components/Button) > [Box](/components/Box)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | m | | space
17 | mt | | space
18 | mr | | space
19 | mb | | space
20 | ml | | space
21 | mx | | space
22 | my | | space
23 | p | | space
24 | pt | | space
25 | pr | | space
26 | pb | | space
27 | pl | | space
28 | px | 3 | space
29 | py | 2 | space
30 | borderRadius | 9999 | radii
--------------------------------------------------------------------------------
/docs/components/ButtonOutline.md:
--------------------------------------------------------------------------------
1 | # ButtonOutline
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Button](/components/Button) > [Box](/components/Box)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | color | | colors
17 | bg | transparent | colors
--------------------------------------------------------------------------------
/docs/components/ButtonTransparent.md:
--------------------------------------------------------------------------------
1 | # ButtonTransparent
2 |
3 | ```.jsx
4 |
5 | Hello
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Button](/components/Button) > [Box](/components/Box)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | color | | colors
17 | bg | transparent | colors
--------------------------------------------------------------------------------
/docs/components/Caps.md:
--------------------------------------------------------------------------------
1 | # Caps
2 |
3 | ```.jsx
4 |
5 | ```
6 |
7 |
8 |
9 | Extends: [Text](/components/Text)
10 |
11 | prop | default | theme key
12 | ---|---|---
13 | fontSize | | fontSizes
14 | letterSpacing | 4 | letterSpacings
--------------------------------------------------------------------------------
/docs/components/Card.md:
--------------------------------------------------------------------------------
1 | # Card
2 |
3 | ```.jsx
4 |
5 |
9 |
10 | Hello
11 |
12 |
13 |
14 | ```
15 |
16 |
17 |
18 | prop | default | theme key
19 | ---|---|---
20 | m | | space
21 | mt | | space
22 | mr | | space
23 | mb | | space
24 | ml | | space
25 | mx | | space
26 | my | | space
27 | p | 2 | space
28 | pt | | space
29 | pr | | space
30 | pb | | space
31 | pl | | space
32 | px | | space
33 | py | | space
34 | color | | colors
35 | bg | white | colors
36 | borderRadius | 2 | radii
37 | boxShadow | 2 | shadows
--------------------------------------------------------------------------------
/docs/components/Circle.md:
--------------------------------------------------------------------------------
1 | # Circle
2 |
3 | ```.jsx
4 |
5 | A
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Badge](/components/Badge) > [Box](/components/Box) > [Box](/components/Box)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | size | 24 | N/A
17 | borderRadius | 99999px | radii
18 | textAlign | | N/A
--------------------------------------------------------------------------------
/docs/components/Close.md:
--------------------------------------------------------------------------------
1 | # Close
2 |
3 | ```.jsx
4 |
5 |
6 | ```
7 |
8 |
9 |
10 | Extends: [ButtonTransparent](/components/ButtonTransparent) > [Button](/components/Button) > [Box](/components/Box)
11 |
12 | prop | default | theme key
13 | ---|---|---
14 | m | | space
15 | mt | | space
16 | mr | | space
17 | mb | | space
18 | ml | | space
19 | mx | | space
20 | my | | space
21 | p | | space
22 | pt | | space
23 | pr | | space
24 | pb | | space
25 | pl | | space
26 | px | 3 | space
27 | py | 2 | space
--------------------------------------------------------------------------------
/docs/components/Code.md:
--------------------------------------------------------------------------------
1 | # Code
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Text](/components/Text) > [Text](/components/Text)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | fontSize | 1 | fontSizes
17 | fontFamily | monospace | fonts
18 | m | | space
19 | mt | | space
20 | mr | | space
21 | mb | | space
22 | ml | | space
23 | mx | | space
24 | my | | space
25 | p | | space
26 | pt | | space
27 | pr | | space
28 | pb | | space
29 | pl | | space
30 | px | | space
31 | py | | space
32 | color | | colors
33 | bg | | colors
--------------------------------------------------------------------------------
/docs/components/Column.md:
--------------------------------------------------------------------------------
1 | # Column
2 |
3 | ```.jsx
4 |
5 | Column
6 | Column
7 | Column
8 |
9 |
10 | ```
11 |
12 |
13 |
14 | Extends: [Box](/components/Box) > [Box](/components/Box)
15 |
16 | prop | default | theme key
17 | ---|---|---
18 | m | | space
19 | mt | | space
20 | mr | | space
21 | mb | 4 | space
22 | ml | | space
23 | mx | | space
24 | my | | space
25 | p | | space
26 | pt | | space
27 | pr | | space
28 | pb | | space
29 | pl | | space
30 | px | 3 | space
31 | py | | space
32 | flex | 1 1 auto | N/A
--------------------------------------------------------------------------------
/docs/components/Container.md:
--------------------------------------------------------------------------------
1 | # Container
2 |
3 | ```.jsx
4 |
5 | Hello
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Box](/components/Box) > [Box](/components/Box)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | m | | space
17 | mt | | space
18 | mr | | space
19 | mb | | space
20 | ml | | space
21 | mx | auto | space
22 | my | | space
23 | p | | space
24 | pt | | space
25 | pr | | space
26 | pb | | space
27 | pl | | space
28 | px | 3 | space
29 | py | | space
30 | maxWidth | 1024 | maxWidths
--------------------------------------------------------------------------------
/docs/components/Divider.md:
--------------------------------------------------------------------------------
1 | # Divider
2 |
3 | ```.jsx
4 |
8 |
9 | ```
10 |
11 |
12 |
13 | Extends: [Box](/components/Box) > [Box](/components/Box)
14 |
15 | prop | default | theme key
16 | ---|---|---
17 | m | | space
18 | mt | | space
19 | mr | | space
20 | mb | | space
21 | ml | | space
22 | mx | | space
23 | my | 3 | space
24 | p | | space
25 | pt | | space
26 | pr | | space
27 | pb | | space
28 | pl | | space
29 | px | | space
30 | py | | space
31 | borderColor | gray | colors
32 | color | | colors
33 | bg | | colors
--------------------------------------------------------------------------------
/docs/components/Dot.md:
--------------------------------------------------------------------------------
1 | # Dot
2 |
3 | ```.jsx
4 |
5 |
6 |
7 |
8 |
9 |
10 | ```
11 |
12 |
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | m | | space
17 | mt | | space
18 | mr | | space
19 | mb | | space
20 | ml | | space
21 | mx | | space
22 | my | | space
23 | p | | space
24 | pt | | space
25 | pr | | space
26 | pb | | space
27 | pl | | space
28 | px | | space
29 | py | | space
30 | size | 16 | N/A
31 | color | | colors
32 | bg | grey | colors
33 | borderRadius | 99999 | radii
34 | border | 4 | borders
35 | borderTop | | borders
36 | borderRight | | borders
37 | borderBottom | | borders
38 | borderLeft | | borders
39 | borderColor | transparent | colors
--------------------------------------------------------------------------------
/docs/components/Drawer.md:
--------------------------------------------------------------------------------
1 | # Drawer
2 |
3 | ```.jsx
4 |
5 |
11 | Hello
12 |
13 |
14 |
15 | ```
16 |
17 |
18 |
19 | Extends: [Box](/components/Box)
20 |
21 | prop | default | theme key
22 | ---|---|---
23 | position | absolute | N/A
24 | color | | colors
25 | bg | black | colors
26 | width | 320 | N/A
27 | zIndex | | N/A
28 | height | | heights
--------------------------------------------------------------------------------
/docs/components/Flex.md:
--------------------------------------------------------------------------------
1 | # Flex
2 |
3 | ```.jsx
4 |
7 |
8 | Flex
9 |
10 |
11 | Box
12 |
13 |
14 |
15 | ```
16 |
17 |
18 |
19 | Extends: [Box](/components/Box)
20 |
21 | prop | default | theme key
22 | ---|---|---
23 | flexWrap | | N/A
24 | flexDirection | | N/A
25 | alignItems | | N/A
26 | justifyContent | | N/A
--------------------------------------------------------------------------------
/docs/components/Heading.md:
--------------------------------------------------------------------------------
1 | # Heading
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Text](/components/Text) > [Text](/components/Text)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | fontSize | 5 | fontSizes
17 | fontWeight | bold | fontWeights
18 | m | | space
19 | mt | | space
20 | mr | | space
21 | mb | | space
22 | ml | | space
23 | mx | | space
24 | my | | space
25 | p | | space
26 | pt | | space
27 | pr | | space
28 | pb | | space
29 | pl | | space
30 | px | | space
31 | py | | space
32 | fontFamily | | fonts
33 | color | | colors
34 | bg | | colors
35 | textAlign | | N/A
--------------------------------------------------------------------------------
/docs/components/Hide.md:
--------------------------------------------------------------------------------
1 | # Hide
2 |
3 | ```.jsx
4 | Hide xsmall
5 | Hide small
6 | Hide medium
7 | Hide large
8 | Hide xlarge
9 |
10 | ```
11 |
12 |
--------------------------------------------------------------------------------
/docs/components/Image.md:
--------------------------------------------------------------------------------
1 | # Image
2 |
3 | ```.jsx
4 |
11 |
12 | ```
13 |
14 |
15 |
16 | Extends: [Image](http://jxnblk.com/rebass/components/Image)
17 |
18 | prop | default | theme key
19 | ---|---|---
20 | m | | space
21 | mt | | space
22 | mr | | space
23 | mb | | space
24 | ml | | space
25 | mx | | space
26 | my | | space
27 | p | | space
28 | pt | | space
29 | pr | | space
30 | pb | | space
31 | pl | | space
32 | px | | space
33 | py | | space
34 | width | | N/A
35 | color | | colors
36 | bg | | colors
--------------------------------------------------------------------------------
/docs/components/Label.md:
--------------------------------------------------------------------------------
1 | # Label
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Text](/components/Text) > [Text](/components/Text)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | fontSize | 1 | fontSizes
17 | m | | space
18 | mt | | space
19 | mr | | space
20 | mb | 1 | space
21 | ml | | space
22 | mx | | space
23 | my | | space
24 | p | | space
25 | pt | | space
26 | pr | | space
27 | pb | | space
28 | pl | | space
29 | px | | space
30 | py | | space
31 | alignItems | | N/A
32 | color | | colors
33 | bg | | colors
--------------------------------------------------------------------------------
/docs/components/Lead.md:
--------------------------------------------------------------------------------
1 | # Lead
2 |
3 | ```.jsx
4 |
5 | Hello Lead
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Text](/components/Text) > [Text](/components/Text)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | fontSize | 3 | fontSizes
--------------------------------------------------------------------------------
/docs/components/Measure.md:
--------------------------------------------------------------------------------
1 | # Measure
2 |
3 | ```.jsx
4 |
5 | Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [MeasureHelper](/components/MeasureHelper)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | maxWidth | 256 | maxWidths
--------------------------------------------------------------------------------
/docs/components/Message.md:
--------------------------------------------------------------------------------
1 | # Message
2 |
3 | ```.jsx
4 |
5 | Hello
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [MessageHelper](/components/MessageHelper)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | m | | space
17 | mt | | space
18 | mr | | space
19 | mb | | space
20 | ml | | space
21 | mx | | space
22 | my | | space
23 | p | | space
24 | pt | | space
25 | pr | | space
26 | pb | | space
27 | pl | | space
28 | px | 3 | space
29 | py | 2 | space
30 | color | | colors
31 | bg | blue | colors
32 | flexDirection | row | N/A
33 | alignItems | center | N/A
34 | minHeight | 48px | minHeights
--------------------------------------------------------------------------------
/docs/components/Modal.md:
--------------------------------------------------------------------------------
1 | # Modal
2 |
3 | ```.jsx
4 | { false && (
5 |
11 |
12 | Hello
13 |
14 |
15 | ) }
16 |
17 | ```
18 |
19 |
20 |
21 | Extends: [Absolute](/components/Absolute) > [Position](/components/Position) > [Box](/components/Box) > [Box](/components/Box)
22 |
23 | prop | default | theme key
24 | ---|---|---
25 | top | 50% | N/A
26 | left | 50% | N/A
27 | m | | space
28 | mt | | space
29 | mr | | space
30 | mb | | space
31 | ml | | space
32 | mx | | space
33 | my | | space
34 | p | 3 | space
35 | pt | | space
36 | pr | | space
37 | pb | | space
38 | pl | | space
39 | px | | space
40 | py | | space
41 | color | | colors
42 | bg | white | colors
43 | borderRadius | 2 | radii
44 | width | | N/A
45 | maxWidth | | maxWidths
46 | maxHeight | | maxHeights
--------------------------------------------------------------------------------
/docs/components/Panel.md:
--------------------------------------------------------------------------------
1 | # Panel
2 |
3 | ```.jsx
4 |
5 |
8 | Hello
9 |
10 |
11 |
12 | Panel
13 |
14 |
15 |
18 | Footer
19 |
20 |
21 |
22 | ```
23 |
24 |
25 |
26 | Extends: [Box](/components/Box) > [Box](/components/Box)
27 |
28 | prop | default | theme key
29 | ---|---|---
30 | color | | colors
31 | bg | white | colors
32 | borderRadius | 2 | radii
33 | border | 1 | borders
34 | borderTop | | borders
35 | borderRight | | borders
36 | borderBottom | | borders
37 | borderLeft | | borders
38 | borderColor | gray | colors
39 | m | | space
40 | mt | | space
41 | mr | | space
42 | mb | | space
43 | ml | | space
44 | mx | | space
45 | my | | space
46 | p | | space
47 | pt | | space
48 | pr | | space
49 | pb | | space
50 | pl | | space
51 | px | | space
52 | py | | space
--------------------------------------------------------------------------------
/docs/components/Position.md:
--------------------------------------------------------------------------------
1 | # Position
2 |
3 | ```.jsx
4 |
8 | Hello
9 |
10 |
11 | ```
12 |
13 |
14 |
15 | Extends: [Box](/components/Box) > [Box](/components/Box)
16 |
17 | prop | default | theme key
18 | ---|---|---
19 | m | | space
20 | mt | | space
21 | mr | | space
22 | mb | | space
23 | ml | | space
24 | mx | | space
25 | my | | space
26 | p | | space
27 | pt | | space
28 | pr | | space
29 | pb | | space
30 | pl | | space
31 | px | | space
32 | py | | space
33 | color | | colors
34 | bg | | colors
35 | zIndex | | N/A
36 | top | | N/A
37 | right | | N/A
38 | bottom | | N/A
39 | left | | N/A
--------------------------------------------------------------------------------
/docs/components/Pre.md:
--------------------------------------------------------------------------------
1 | # Pre
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | prop | default | theme key
13 | ---|---|---
14 | fontSize | 1 | fontSizes
15 | fontFamily | monospace | fonts
16 | m | | space
17 | mt | | space
18 | mr | | space
19 | mb | | space
20 | ml | | space
21 | mx | | space
22 | my | | space
23 | p | | space
24 | pt | | space
25 | pr | | space
26 | pb | | space
27 | pl | | space
28 | px | | space
29 | py | | space
30 | color | | colors
31 | bg | | colors
--------------------------------------------------------------------------------
/docs/components/Progress.md:
--------------------------------------------------------------------------------
1 | # Progress
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | prop | default | theme key
13 | ---|---|---
14 | width | 1 | N/A
15 | m | | space
16 | mt | | space
17 | mr | | space
18 | mb | | space
19 | ml | | space
20 | mx | | space
21 | my | | space
22 | p | | space
23 | pt | | space
24 | pr | | space
25 | pb | | space
26 | pl | | space
27 | px | | space
28 | py | | space
29 | color | | colors
30 | bg | gray | colors
31 | borderRadius | 2 | radii
--------------------------------------------------------------------------------
/docs/components/Provider.md:
--------------------------------------------------------------------------------
1 | # Provider
2 |
3 | ```.jsx
4 |
5 | ```
6 |
7 |
--------------------------------------------------------------------------------
/docs/components/Relative.md:
--------------------------------------------------------------------------------
1 | # Relative
2 |
3 | ```.jsx
4 |
5 | ```
6 |
7 |
8 |
9 | Extends: [Position](/components/Position) > [Box](/components/Box) > [Box](/components/Box)
--------------------------------------------------------------------------------
/docs/components/Row.md:
--------------------------------------------------------------------------------
1 | # Row
2 |
3 | ```.jsx
4 |
5 | Column
6 | Column
7 |
8 |
9 | ```
10 |
11 |
12 |
13 | Extends: [Flex](/components/Flex) > [Box](/components/Box)
14 |
15 | prop | default | theme key
16 | ---|---|---
17 | flexDirection | row | N/A
18 | m | | space
19 | mt | | space
20 | mr | | space
21 | mb | | space
22 | ml | | space
23 | mx | -3 | space
24 | my | | space
25 | p | | space
26 | pt | | space
27 | pr | | space
28 | pb | | space
29 | pl | | space
30 | px | | space
31 | py | | space
--------------------------------------------------------------------------------
/docs/components/Small.md:
--------------------------------------------------------------------------------
1 | # Small
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Text](/components/Text) > [Text](/components/Text)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | fontSize | | fontSizes
--------------------------------------------------------------------------------
/docs/components/Subhead.md:
--------------------------------------------------------------------------------
1 | # Subhead
2 |
3 | ```.jsx
4 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Heading](/components/Heading) > [Text](/components/Text) > [Text](/components/Text)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | fontSize | 4 | fontSizes
--------------------------------------------------------------------------------
/docs/components/Tab.md:
--------------------------------------------------------------------------------
1 | # Tab
2 |
3 | ```.jsx
4 |
5 | Hello
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [TabHelper](/components/TabHelper)
13 |
14 | prop | default | theme key
15 | ---|---|---
16 | m | | space
17 | mt | | space
18 | mr | 3 | space
19 | mb | | space
20 | ml | | space
21 | mx | | space
22 | my | | space
23 | p | | space
24 | pt | | space
25 | pr | | space
26 | pb | | space
27 | pl | | space
28 | px | | space
29 | py | 2 | space
30 | borderColor | transparent | colors
--------------------------------------------------------------------------------
/docs/components/Tabs.md:
--------------------------------------------------------------------------------
1 | # Tabs
2 |
3 | ```.jsx
4 |
5 |
6 | Beep
7 |
8 |
9 | Boop
10 |
11 |
12 | Bop
13 |
14 |
15 |
16 | ```
17 |
18 |
19 |
20 | Extends: [Flex](/components/Flex) > [Box](/components/Box)
21 |
22 | prop | default | theme key
23 | ---|---|---
24 | flexDirection | row | N/A
25 | borderColor | gray | colors
--------------------------------------------------------------------------------
/docs/components/Text.md:
--------------------------------------------------------------------------------
1 | # Text
2 |
3 | ```.jsx
4 |
9 |
10 | ```
11 |
12 |
13 |
14 | Extends: [Text](http://jxnblk.com/rebass/components/Text)
15 |
16 | prop | default | theme key
17 | ---|---|---
18 | m | | space
19 | mt | | space
20 | mr | | space
21 | mb | | space
22 | ml | | space
23 | mx | | space
24 | my | | space
25 | p | | space
26 | pt | | space
27 | pr | | space
28 | pb | | space
29 | pl | | space
30 | px | | space
31 | py | | space
32 | color | | colors
33 | bg | | colors
34 | fontFamily | | fonts
35 | fontSize | | fontSizes
36 | fontWeight | | fontWeights
37 | textAlign | | N/A
--------------------------------------------------------------------------------
/docs/components/Truncate.md:
--------------------------------------------------------------------------------
1 | # Truncate
2 |
3 | ```.jsx
4 |
5 | Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
6 |
7 |
8 | ```
9 |
10 |
11 |
12 | Extends: [Text](/components/Text) > [Text](/components/Text)
--------------------------------------------------------------------------------
/docs/extending.md:
--------------------------------------------------------------------------------
1 |
2 | # Extending
3 |
4 | Rebass components can be completely customized using styled-components.
5 |
6 | ```jsx
7 | import { Button } from 'rebass'
8 | import styled from 'styled-components'
9 |
10 | const CustomButton = styled(Button)`
11 | border-radius: 50%;
12 | `
13 | ```
--------------------------------------------------------------------------------
/docs/getting-started.md:
--------------------------------------------------------------------------------
1 |
2 | # Getting Started
3 |
4 | ```sh
5 | npm i rebass-native
6 | ```
7 |
8 | ## Provider
9 |
10 | To ensure Rebass Natives's theme is properly configured, use the `` component at the root of your application.
11 | The `Provider` component accepts a `theme` props for setting a [custom theme][theming].
12 |
13 | ```.jsx
14 |
15 | Hello
16 |
17 | ```
18 |
19 | Import UI components directly from Rebass Native and use them to build larger components.
20 |
21 | ```js
22 | import {
23 | Card,
24 | Box,
25 | Image,
26 | Subhead,
27 | Small
28 | } from 'rebass-native'
29 | ```
30 |
31 | ```.jsx
32 |
33 |
34 |
35 |
36 | Card
37 | Small meta text
38 |
39 |
40 |
41 | ```
42 |
43 | Alternatively, use Rebass Native components as the starting point for custom UI components.
44 |
45 | ```jsx
46 | import styled from 'styled-components'
47 | import { Button as BaseButton } from 'rebass-native'
48 |
49 | const Button = styled(BaseButton)`
50 | opacity: ${props => props.disabled ? props.theme.colors.semiTransparent : 1};
51 | `
52 |
53 | export default Button
54 | ```
55 |
56 | [theming]: theming.md
57 | [grid-styled]: https://github.com/jxnblk/grid-styled
--------------------------------------------------------------------------------
/docs/props.md:
--------------------------------------------------------------------------------
1 |
2 | # Props
3 |
4 | ## Styled System
5 |
6 | Rebass Native components use [styled-system][system] for responsive, theme-based style props.
7 |
8 | ## Margin and Padding
9 |
10 | All Rebass Native component use the [space][space] utility from [styled-system][system] to handle responsive margin and padding props based on a global spacing scale (`theme.space`).
11 | The margin and padding props help promote consistency in layout
12 | without the need to add custom margin and padding declarations throughout an application.
13 | The margin and padding props use a shorthand syntax, similar to other OOCSS approaches and many CSS libraries.
14 |
15 | ```.jsx
16 |
22 | Hello
23 |
24 | ```
25 |
26 | - `m`: margin
27 | - `mt`: margin-top
28 | - `mr`: margin-right
29 | - `mb`: margin-bottom
30 | - `ml`: margin-left
31 | - `mx`: margin-left and margin-right
32 | - `my`: margin-top and margin-bottom
33 | - `p` : padding
34 | - `pt`: padding-top
35 | - `pr`: padding-right
36 | - `pb`: padding-bottom
37 | - `pl`: padding-left
38 | - `px`: padding-left and padding-right
39 | - `py`: padding-top and padding-bottom
40 |
41 | ```jsx
42 | // Numbers reference steps on the spacing scale
43 | // e.g. 8px
44 |
45 |
46 | // Numbers greater than the length of `theme.space.length` are converted to pixels
47 |
48 |
49 | // Negative values can be used to add negative margins
50 |
51 |
52 | // Strings can be used for other values
53 |
54 |
55 | // Arrays can be used for mobile-first responsive styles
56 |
57 | ```
58 |
59 | ## Colors
60 |
61 | All Rebass Native components use [styled-system's][system] [color][color] function to add the `color` and `bg` props.
62 | The `color` and `bg` props make using colors from the color palette simple to help promote design consistency.
63 |
64 | The color values can be defined in the `theme.colors` object.
65 |
66 | ```.jsx
67 |
68 | Hello
69 |
70 | ```
71 |
72 | ```jsx
73 | // Keys reference values in the color palette object
74 |
75 |
76 | // Background color can be set with the `bg` prop
77 |
78 |
79 | // Values that do not map to a key in `theme.colors` can be used
80 |
81 |
82 | // Arrays can be used to change colors responsively
83 |
84 | ```
85 |
86 | ## Responsive Styles
87 |
88 | Many Rebass Native props accept arrays as values to set mobile-first responsive styles.
89 | The first value is not scoped to a media query and applies to all breakpoints.
90 | Each value after the first corresponds to a media query derived from `theme.breakpoints`.
91 |
92 | See the [styled-system][responsive] docs for more info.
93 |
94 | ```.jsx
95 |
96 |
101 | Hello
102 |
103 |
108 | Hello
109 |
110 |
111 | ```
112 |
113 | ```jsx
114 |
122 | ```
123 |
124 | ## Component-Specific Props
125 |
126 | Refer to the [component documentation](components.md) for information on component-specific props.
127 |
128 | [system]: https://github.com/jxnblk/styled-system
129 | [space]: https://github.com/jxnblk/styled-system/blob/master/docs/api.md#space-responsive
130 | [color]: https://github.com/jxnblk/styled-system/blob/master/docs/api.md#color-responsive
131 | [responsive]: https://github.com/jxnblk/styled-system/blob/master/docs/responsive-styles.md
132 | [system-components]: https://github.com/jxnblk/styled-system/tree/master/system-components
--------------------------------------------------------------------------------
/docs/theming.md:
--------------------------------------------------------------------------------
1 |
2 | # Theming
3 |
4 | Rebass Natives's core theme includes breakpoints, a spacing scale,
5 | a typographic scale, fonts, font weights, border radii, and colors, all of which can be configured with the `` component.
6 |
7 | To customize the underlying theme, pass a `theme` object to the `` component.
8 |
9 | ```.jsx
10 |
23 |
24 | Hello
25 |
26 |
27 | ```
28 |
29 | The theme object has the following shape. Any custom values passed to the Provider component will be merged with the defaults.
30 |
31 | ```js
32 | // Default values
33 | const theme = {
34 | breakpoints: [
35 | 32,
36 | 48,
37 | 64,
38 | 80
39 | ],
40 | space: [
41 | 0,
42 | 4,
43 | 8,
44 | 16,
45 | 32,
46 | 64,
47 | 128,
48 | ],
49 | fonts: {
50 | sans: 'system-ui, sans-serif',
51 | mono: 'Menlo, monospace',
52 | },
53 | fontSizes: [
54 | 12,
55 | 14,
56 | 16,
57 | 20,
58 | 24,
59 | 32,
60 | 48,
61 | 64,
62 | 72,
63 | 96
64 | ],
65 | fontWeights: {
66 | normal: 400,
67 | bold: 700
68 | },
69 | colors: {
70 | black: '#000',
71 | white: '#fff',
72 | ...etc
73 | },
74 | radii: [ 0, 2, 4 ]
75 | }
76 | ```
77 |
--------------------------------------------------------------------------------
/examples/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hermanya/rebass-native/02bbda144120cff1cfcbc20dff5f5a4ac6ef8dec/examples/.DS_Store
--------------------------------------------------------------------------------
/examples/app/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["babel-preset-expo"],
3 | "env": {
4 | "development": {
5 | "plugins": ["transform-react-jsx-source"]
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/app/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/**/*
2 | .expo/*
3 | npm-debug.*
4 |
--------------------------------------------------------------------------------
/examples/app/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/examples/app/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ScrollView, View } from 'react-native'
3 | import { Font } from 'expo'
4 | import {
5 | Text,
6 | Provider
7 | } from 'rebass-native'
8 | import {RootStack} from './RootStack'
9 |
10 | const theme = {
11 | colors: {
12 | blue: '#6785d0',
13 | violet: '#b75fb3',
14 | yellow: '#b88f3e',
15 | red: '#cb5658',
16 | green: '#64a85c'
17 | }
18 | }
19 |
20 | export default class App extends React.Component {
21 | constructor (props) {
22 | super(props)
23 | this.state = {
24 | loading: true
25 | }
26 | this.loadFonts()
27 | .then(() => this.setState({loading: false}))
28 | }
29 | loadFonts () {
30 | return Font.loadAsync({
31 | 'monospace': require('./assets/fonts/SpaceMono-Regular.ttf')
32 | })
33 | }
34 | render () {
35 | if (this.state.loading) {
36 | return Loading!
37 | }
38 | return (
39 |
40 |
41 | //
42 | //
43 | //
44 | //
45 | )
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/examples/app/RootStack.js:
--------------------------------------------------------------------------------
1 |
2 | import { createStackNavigator } from 'react-navigation'
3 | import {IndexScreen} from './IndexScreen.js'
4 | import {FlexScreen} from './screens/FlexScreen.js'
5 | import {BoxScreen} from './screens/BoxScreen.js'
6 | import {ProviderScreen} from './screens/ProviderScreen.js'
7 | import {ButtonScreen} from './screens/ButtonScreen.js'
8 | import {ButtonOutlineScreen} from './screens/ButtonOutlineScreen.js'
9 | import {ButtonCircleScreen} from './screens/ButtonCircleScreen.js'
10 | import {ButtonTransparentScreen} from './screens/ButtonTransparentScreen.js'
11 | import {CloseScreen} from './screens/CloseScreen.js'
12 | import {TextScreen} from './screens/TextScreen.js'
13 | import {HeadingScreen} from './screens/HeadingScreen.js'
14 | import {SubheadScreen} from './screens/SubheadScreen.js'
15 | import {CapsScreen} from './screens/CapsScreen.js'
16 | import {SmallScreen} from './screens/SmallScreen.js'
17 | import {LeadScreen} from './screens/LeadScreen.js'
18 | import {TruncateScreen} from './screens/TruncateScreen.js'
19 | import {BlockquoteScreen} from './screens/BlockquoteScreen.js'
20 | import {PreScreen} from './screens/PreScreen.js'
21 | import {CodeScreen} from './screens/CodeScreen.js'
22 | import {MeasureScreen} from './screens/MeasureScreen.js'
23 | import {LabelScreen} from './screens/LabelScreen.js'
24 | import {DividerScreen} from './screens/DividerScreen.js'
25 | import {BorderScreen} from './screens/BorderScreen.js'
26 | import {ImageScreen} from './screens/ImageScreen.js'
27 | import {AvatarScreen} from './screens/AvatarScreen.js'
28 | import {ContainerScreen} from './screens/ContainerScreen.js'
29 | import {RowScreen} from './screens/RowScreen.js'
30 | import {ColumnScreen} from './screens/ColumnScreen.js'
31 | import {CardScreen} from './screens/CardScreen.js'
32 | import {PanelScreen} from './screens/PanelScreen.js'
33 | import {ProgressScreen} from './screens/ProgressScreen.js'
34 | import {BannerScreen} from './screens/BannerScreen.js'
35 | import {MessageScreen} from './screens/MessageScreen.js'
36 | import {TabsScreen} from './screens/TabsScreen.js'
37 | import {TabScreen} from './screens/TabScreen.js'
38 | import {BadgeScreen} from './screens/BadgeScreen.js'
39 | import {CircleScreen} from './screens/CircleScreen.js'
40 | import {DotScreen} from './screens/DotScreen.js'
41 | import {ArrowScreen} from './screens/ArrowScreen.js'
42 | import {PositionScreen} from './screens/PositionScreen.js'
43 | import {AbsoluteScreen} from './screens/AbsoluteScreen.js'
44 | import {RelativeScreen} from './screens/RelativeScreen.js'
45 | import {ModalScreen} from './screens/ModalScreen.js'
46 | import {DrawerScreen} from './screens/DrawerScreen.js'
47 | import {HideScreen} from './screens/HideScreen.js'
48 |
49 | export const RootStack = createStackNavigator(
50 | {
51 | IndexScreen,
52 | FlexScreen,
53 | BoxScreen,
54 | ProviderScreen,
55 | ButtonScreen,
56 | ButtonOutlineScreen,
57 | ButtonCircleScreen,
58 | ButtonTransparentScreen,
59 | CloseScreen,
60 | TextScreen,
61 | HeadingScreen,
62 | SubheadScreen,
63 | CapsScreen,
64 | SmallScreen,
65 | LeadScreen,
66 | TruncateScreen,
67 | BlockquoteScreen,
68 | PreScreen,
69 | CodeScreen,
70 | MeasureScreen,
71 | LabelScreen,
72 | DividerScreen,
73 | BorderScreen,
74 | ImageScreen,
75 | AvatarScreen,
76 | ContainerScreen,
77 | RowScreen,
78 | ColumnScreen,
79 | CardScreen,
80 | PanelScreen,
81 | ProgressScreen,
82 | BannerScreen,
83 | MessageScreen,
84 | TabsScreen,
85 | TabScreen,
86 | BadgeScreen,
87 | CircleScreen,
88 | DotScreen,
89 | ArrowScreen,
90 | PositionScreen,
91 | AbsoluteScreen,
92 | RelativeScreen,
93 | ModalScreen,
94 | DrawerScreen,
95 | HideScreen
96 | },
97 | {
98 | initialRouteName: 'IndexScreen'
99 | }
100 | )
101 |
--------------------------------------------------------------------------------
/examples/app/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "example",
4 | "description": "This project is really great.",
5 | "slug": "example",
6 | "privacy": "public",
7 | "sdkVersion": "29.0.0",
8 | "platforms": ["ios", "android"],
9 | "version": "1.0.0",
10 | "orientation": "portrait",
11 | "icon": "./assets/icon.png",
12 | "splash": {
13 | "image": "./assets/splash.png",
14 | "resizeMode": "contain",
15 | "backgroundColor": "#ffffff"
16 | },
17 | "updates": {
18 | "fallbackToCacheTimeout": 0
19 | },
20 | "assetBundlePatterns": [
21 | "**/*"
22 | ],
23 | "ios": {
24 | "supportsTablet": true
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/app/assets/fonts/SpaceMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hermanya/rebass-native/02bbda144120cff1cfcbc20dff5f5a4ac6ef8dec/examples/app/assets/fonts/SpaceMono-Regular.ttf
--------------------------------------------------------------------------------
/examples/app/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hermanya/rebass-native/02bbda144120cff1cfcbc20dff5f5a4ac6ef8dec/examples/app/assets/icon.png
--------------------------------------------------------------------------------
/examples/app/assets/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hermanya/rebass-native/02bbda144120cff1cfcbc20dff5f5a4ac6ef8dec/examples/app/assets/splash.png
--------------------------------------------------------------------------------
/examples/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "empty-project-template",
3 | "main": "node_modules/expo/AppEntry.js",
4 | "private": true,
5 | "scripts": {
6 | "start": "expo start",
7 | "android": "expo start --android",
8 | "ios": "expo start --ios",
9 | "eject": "expo eject"
10 | },
11 | "dependencies": {
12 | "exp": "^57.0.0",
13 | "expo": "^29.0.0",
14 | "react": "16.3.1",
15 | "react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
16 | "react-navigation": "^2.12.1",
17 | "rebass-native": "latest",
18 | "styled-components": "^3.4.5"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/examples/app/screens/AbsoluteScreen.js:
--------------------------------------------------------------------------------
1 |
2 | import React from 'react';
3 | import {ScrollView} from 'react-native'
4 | import * as RebassNative from 'rebass-native'
5 |
6 | export class AbsoluteScreen extends React.Component {
7 | static navigationOptions = {
8 | title: 'Absolute',
9 | };
10 | render () {
11 | return (
12 |
13 | Demo
14 |
15 |
16 |
17 | Hello
18 |
19 |
20 |
21 |
22 |
23 | Code
24 | {`
25 |
26 | Hello
27 |
28 |
29 | `}
30 |
31 | Inheritance
32 | {
33 | this.props.navigation.navigate('PositionScreen')
34 | }}>Position → {
35 | this.props.navigation.navigate('BoxScreen')
36 | }}>Box → {
37 | this.props.navigation.navigate('BoxScreen')
38 | }}>Box
39 |
40 | Props
41 |
42 |
43 | )
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/examples/app/screens/ArrowScreen.js:
--------------------------------------------------------------------------------
1 |
2 | import React from 'react';
3 | import {ScrollView} from 'react-native'
4 | import * as RebassNative from 'rebass-native'
5 |
6 | export class ArrowScreen extends React.Component {
7 | static navigationOptions = {
8 | title: 'Arrow',
9 | };
10 | render () {
11 | return (
12 |
13 | Demo
14 |
15 |
16 |
17 |
18 |
19 | Code
20 | {`
21 | `}
22 |
23 | Inheritance
24 |
25 |
26 | Props
27 |
28 |
29 |
30 | prop
31 |
32 |
33 | default
34 |
35 |
36 | theme key
37 |
38 |
39 |
40 | m
41 |
42 | space
43 |
44 |
45 | mt
46 |
47 | space
48 |
49 |
50 | mr
51 |
52 | space
53 |
54 |
55 | mb
56 |
57 | space
58 |
59 |
60 | ml
61 |
62 | space
63 |
64 |
65 | mx
66 |
67 | space
68 |
69 |
70 | my
71 |
72 | space
73 |
74 |
75 | p
76 |
77 | space
78 |
79 |
80 | pt
81 |
82 | space
83 |
84 |
85 | pr
86 |
87 | space
88 |
89 |
90 | pb
91 |
92 | space
93 |
94 |
95 | pl
96 |
97 | space
98 |
99 |
100 | px
101 |
102 | space
103 |
104 |
105 | py
106 |
107 | space
108 |
109 |
110 | color
111 |
112 | colors
113 |
114 |
115 | bg
116 |
117 | colors
118 |
119 |
120 |
121 | )
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/examples/app/screens/BadgeScreen.js:
--------------------------------------------------------------------------------
1 |
2 | import React from 'react';
3 | import {ScrollView} from 'react-native'
4 | import * as RebassNative from 'rebass-native'
5 |
6 | export class BadgeScreen extends React.Component {
7 | static navigationOptions = {
8 | title: 'Badge',
9 | };
10 | render () {
11 | return (
12 |
13 | Demo
14 |
15 |
16 | Hello
17 |
18 | Beep
19 |
20 |
21 |
22 |
23 |
24 | Code
25 | {`
26 | Hello
27 |
28 | Beep
29 |
30 |
31 | `}
32 |
33 | Inheritance
34 | {
35 | this.props.navigation.navigate('BoxScreen')
36 | }}>Box → {
37 | this.props.navigation.navigate('BoxScreen')
38 | }}>Box
39 |
40 | Props
41 |
42 |
43 |
44 | prop
45 |
46 |
47 | default
48 |
49 |
50 | theme key
51 |
52 |
53 |
54 | m
55 |
56 | space
57 |
58 |
59 | mt
60 |
61 | space
62 |
63 |
64 | mr
65 |
66 | space
67 |
68 |
69 | mb
70 |
71 | space
72 |
73 |
74 | ml
75 |
76 | space
77 |
78 |
79 | mx
80 | 1
81 | space
82 |
83 |
84 | my
85 |
86 | space
87 |
88 |
89 | p
90 |
91 | space
92 |
93 |
94 | pt
95 |
96 | space
97 |
98 |
99 | pr
100 |
101 | space
102 |
103 |
104 | pb
105 |
106 | space
107 |
108 |
109 | pl
110 |
111 | space
112 |
113 |
114 | px
115 | 2
116 | space
117 |
118 |
119 | py
120 | 1
121 | space
122 |
123 |
124 | color
125 |
126 | colors
127 |
128 |
129 | bg
130 | blue
131 | colors
132 |
133 |
134 | borderRadius
135 | 2
136 | radii
137 |
138 |
139 |
140 | )
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/examples/app/screens/BlockquoteScreen.js:
--------------------------------------------------------------------------------
1 |
2 | import React from 'react';
3 | import {ScrollView} from 'react-native'
4 | import * as RebassNative from 'rebass-native'
5 |
6 | export class BlockquoteScreen extends React.Component {
7 | static navigationOptions = {
8 | title: 'Blockquote',
9 | };
10 | render () {
11 | return (
12 |
13 | Demo
14 |
15 |
16 | “The simplest scale is a single note, and sticking with a single note draws more attention to other parameters, such as rhythm and inflection.”
17 |
18 |
19 |
20 |
21 | Code
22 | {`
23 | “The simplest scale is a single note, and sticking with a single note draws more attention to other parameters, such as rhythm and inflection.”
24 |
2 | “The simplest scale is a single note, and sticking with a single note draws more attention to other parameters, such as rhythm and inflection.”
3 |