elevenyellow-components
v2.1.4
Published
Eleven Yellow React Components
Downloads
11
Readme
Installation
meteor
meteor npm install --save elevenyellow-components
node.js (webpack)
npm install --save elevenyellow-components
Example
Functional
import Button from 'elevenyellow-components/lib/button'
export default () => (
<Button>My cool functional component</Button>
)
Classes
import Button from 'elevenyellow-components/lib/button'
export default class MyButton extends React.Component {
constructor(props) {
super(props)
}
render() {
return <Button>My cool functional component</Button>
}
}
Theming
ThemeProvider
import React from 'react'
import { ThemeProvider } from 'styled-components'
import { defaults } from 'elevenyellow-components/lib/theme'
import { Button } from 'elevenyellow-components/lib/button'
export default class App extends React.Component {
render() {
return (
<ThemeProvider theme={defaults}>
<Button>Click me!</Button>
...
</ThemeProvider>
)
}
}
Property theme (theme="")
todo
Property extendTheme (extendTheme="")
todo
Property className (className="")
todo
Property style (style="")
<Button className="some-extra-style">Custom button</Button>
Deploy storybook
git clone https://github.com/elevenyellow/components
cd components
npm i -g getstorybook
npm install
npm run storybook
open http://localhost:6006/
Maintaining the npm package
todo