Skip to content

Commit

Permalink
css modules react-component#5
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniogiordano committed Jan 24, 2017
1 parent ffd4d70 commit b5d7932
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/DOMWrap.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import css from '../assets/index.css';

const DOMWrap = React.createClass({
propTypes: {
Expand All @@ -17,7 +18,7 @@ const DOMWrap = React.createClass({
const props = { ...this.props };
if (!props.visible) {
props.className = props.className || '';
props.className += ` ${props.hiddenClassName}`;
props.className += ` ${css[`${props.hiddenClassName}`]}`;
}
const Tag = props.tag;
delete props.tag;
Expand Down
2 changes: 1 addition & 1 deletion src/MenuMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const MenuMixin = {
<DOMWrap
style={props.style}
tag="ul"
hiddenClassName={`${props.prefixCls}-hidden`}
hiddenClassName={`${css[`${props.prefixCls}-hidden`]}`}
visible={props.visible}
{...domProps}
>
Expand Down

0 comments on commit b5d7932

Please sign in to comment.