diff --git a/.gitignore b/.gitignore index 6cd909f..2028e0a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ # production /build /dist -/docs # misc .DS_Store diff --git a/README.md b/README.md index 74a385a..7330b21 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,10 @@ Our goal is to animate more and more developers and companies to create higher o `npm i @magicsoup.io/stock` -## Quick start -`import { Text } from 'magicsoup.io/stock'` +## Documentation + +### Quick start +`import { Text } from '@magicsoup.io/stock'` ``` ``` - -## Documentation - -- Quick start -- Property API -- Extending components -- Theming -- Components - - Box - - Flex - - Text - - Heading - - Button - - Link - - Image - - Card -- Advanced -- Examples - +Read the [docs](https://docs.magicsoup.io/) ! ## TBD - Docs (Finish docs for base components) diff --git a/docs/components.md b/docs/components.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/examples.md b/docs/examples.md new file mode 100644 index 0000000..fd9e641 --- /dev/null +++ b/docs/examples.md @@ -0,0 +1 @@ +tbd \ No newline at end of file diff --git a/docs/extending.md b/docs/extending.md new file mode 100644 index 0000000..fc3251a --- /dev/null +++ b/docs/extending.md @@ -0,0 +1,36 @@ +MagicSoup components are great to use as base components that can be extended for various purposes in your design system. + +There are two primary ways to extend MagicSoup components: + +```js static +// React-based extension +import React from 'react' +import { Box } from '@magicsoup.io/stock' + +const Jumbotron = props => + +``` + +Using the css prop requires the use of `babel-plugin-styled-components`: + +```js static +// styled-components based extension +import styled from 'styled-components' +import { Box } from '@magicsoup.io/stock' + +const Jumbotron = styled(Box)({ + maxWidth: '1024px' +}) + +Jumbotron.defaultProps = { + mx: 'auto' +} +``` + +See more [Examples](Examples.md). diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000..ddcb1c3 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,16 @@ + +### Installation +`npm i @magicsoup-io/stock` + +### Usage + +`import { Text } from 'magicsoup-io/stock'` + +```js static + + This is a basic text element + +``` \ No newline at end of file diff --git a/docs/grid.md b/docs/grid.md new file mode 100644 index 0000000..8220415 --- /dev/null +++ b/docs/grid.md @@ -0,0 +1,49 @@ +```jsx + + + + 1/2 + + + + + 1/2 + + + + + 1/3 + + + + + 1/3 + + + + + 1/3 + + + + + 1/4 + + + + + 1/4 + + + + + 1/4 + + + + + 1/4 + + + +``` \ No newline at end of file diff --git a/docs/properties.md b/docs/properties.md new file mode 100644 index 0000000..9eda72d --- /dev/null +++ b/docs/properties.md @@ -0,0 +1,115 @@ +MagicSoup components use styled-system for responsive, theme-based style props. Each MagicSoup component extends the base Box component, which includes several general-purpose style props. + +Read more about [styled-component property API](https://github.com/jxnblk/styled-system/blob/master/docs/api.md) + +### Colors +All MagicSoup components use styled-system's color function to add the `color` and `bg` props. The `color` and `bg` props make using colors from the color palette simple to help promote design consistency. + +The color values can be defined in the theme.colors object. + +```js static + + Background and text color! + +``` + +```js static +// Keys reference values in the color palette object + + +// Background color can be set with the `bg` prop + + +// Values that do not map to a key in `theme.colors` can be used +