@jswork/styled-box
Version:
Styled box for react.
68 lines (52 loc) • 2 kB
Markdown
> Styled box for react.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
```shell
npm install -S @jswork/styled-box
```
| Name | Type | Required | Default | Description |
| --------- | ------ | -------- | ------- | ------------------------------------- |
| className | string | false | - | The extended className for component. |
| value | object | false | null | Default value. |
| onChange | func | false | noop | The change handler. |
1. import css
```scss
@import "~@jswork/boilerplate-react-component/dist/style.css";
// or use sass
@import "~@jswork/boilerplate-react-component/dist/style.scss";
// customize your styles:
$boilerplate-react-component-options: ()
```
2. import js
```js
import React from 'react';
import StyledBox from '../@jswork/boilerplate-react-component';
import styled from 'styled-components';
const Container = styled.div`
width: 80%;
margin: 30px auto 0;
`;
export default (props: any) => {
return (
<Container>
<StyledBox />
</Container>
);
};
```
Code released under [the MIT license](https://github.com/afeiship/styled-box/blob/master/LICENSE.txt).
[]: https://img.shields.io/npm/v/@jswork/styled-box
[]: https://npmjs.org/package/@jswork/styled-box
[]: https://img.shields.io/npm/l/@jswork/styled-box
[]: https://github.com/afeiship/styled-box/blob/master/LICENSE.txt
[]: https://img.shields.io/bundlephobia/minzip/@jswork/styled-box
[]: https://github.com/afeiship/styled-box/blob/master/dist/styled-box.min.js
[]: https://img.shields.io/npm/dm/@jswork/styled-box
[]: https://www.npmjs.com/package/@jswork/styled-box