Migrate MenuDivider to themr
parent
e20bae5e62
commit
54dca2d5cc
|
@ -1,8 +1,14 @@
|
|||
import React from 'react';
|
||||
import style from './style.menu_divider';
|
||||
import { themr } from 'react-css-themr';
|
||||
|
||||
const MenuDivider = () => (
|
||||
<hr data-react-toolbox='menu-divider' className={style.root}/>
|
||||
const MenuDivider = ({ theme }) => (
|
||||
<hr data-react-toolbox='menu-divider' className={theme.menuDivider}/>
|
||||
);
|
||||
|
||||
export default MenuDivider;
|
||||
MenuDivider.propTypes = {
|
||||
theme: React.PropTypes.shape({
|
||||
menuDivider: React.PropTypes.string.isRequired
|
||||
})
|
||||
};
|
||||
|
||||
export default themr('ToolboxMenu')(MenuDivider);
|
||||
|
|
|
@ -109,4 +109,4 @@ The inner component for menus and describes the content of each option. It behav
|
|||
|
||||
## Menu Divider
|
||||
|
||||
A very simple component that just displays a separator between options. It has no props and no state or methods, just markup.
|
||||
A very simple component that just displays a separator between options. It has no props and no state or methods, just markup. Also it accepts a single class for the styling which is `menuDivider`.
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
@import "../base";
|
||||
@import "./config";
|
||||
|
||||
.root {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
margin: $menu-divider-height 0;
|
||||
background-color: $color-divider;
|
||||
}
|
|
@ -142,3 +142,11 @@
|
|||
.shortcut {
|
||||
margin-left: $menu-item-padding;
|
||||
}
|
||||
|
||||
.menuDivider {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
margin: $menu-divider-height 0;
|
||||
background-color: $color-divider;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue