@jswork/react-ant-menu-burger
v1.0.1
Published
A hamburger for menu expand/collapse.
Downloads
4
Readme
react-ant-menu-burger
A hamburger for menu expand/collapse.
installation
npm install -S @jswork/react-ant-menu-burger
properties
| Name | Type | Required | Default | Description | | --------- | ------ | -------- | ------- | ------------------------------------- | | className | string | false | - | The extended className for component. | | disabled | bool | false | false | If onClick works. | | value | bool | false | false | Default value. | | onChange | func | false | noop | The change handler. | | elements | array | false | [] | The menu fold/unfold elements. |
usage
- import css
@import "~@jswork/react-ant-menu-burger/dist/style.css";
// or use sass
@import "~@jswork/react-ant-menu-burger/dist/style.scss";
// customize your styles:
$react-ant-menu-burger-options: ()
- import js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactAntMenuBurger from '@jswork/react-ant-menu-burger';
import ReactAdminIcons from '@jswork/react-admin-icons';
import './assets/style.scss';
class App extends React.Component {
render() {
return (
<ReactDemokit
className="p-3 app-container"
url="https://github.com/afeiship/react-ant-menu-burger">
<ReactAntMenuBurger
elements={[
<ReactAdminIcons value="shrink-right" />,
<ReactAdminIcons value="spread-left" />
]}
/>
</ReactDemokit>
);
}
}
ReactDOM.render(<App />, document.getElementById('app'));
documentation
- https://afeiship.github.io/react-ant-menu-burger/
license
Code released under the MIT license.