Skip to content

Commit 6fc1ce2

Browse files
authored
Merge pull request #1 from cncolder/bugfix
fix panel className
2 parents ebab164 + 97e9fb1 commit 6fc1ce2

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/components/panel/panel_body.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import classNames from 'classnames';
77
*/
88
export default class PanelBody extends React.Component {
99
render() {
10-
const {children, ...others} = this.props;
11-
const className = classNames({
10+
const {className, children, ...others} = this.props;
11+
const cls = classNames({
1212
'weui-panel__bd': true,
1313
[className]: className
1414
});
1515

1616
return (
17-
<div className={className} {...others}>{children}</div>
17+
<div className={cls} {...others}>{children}</div>
1818
);
1919
}
20-
};
20+
};

src/components/panel/panel_footer.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import classNames from 'classnames';
77
*/
88
export default class PanelFooter extends React.Component {
99
render() {
10-
const {children, ...others} = this.props;
10+
const {className, children, ...others} = this.props;
1111
const Component = this.props.href ? 'a' : 'div';
12-
const className = classNames({
12+
const cls = classNames({
1313
'weui-panel__ft': true,
1414
[className]: className
1515
});
1616

1717
return (
18-
<Component className={className} {...others}>{children}</Component>
18+
<Component className={cls} {...others}>{children}</Component>
1919
);
2020
}
21-
};
21+
};

src/components/panel/panel_header.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import classNames from 'classnames';
77
*/
88
export default class PanelHeader extends React.Component {
99
render() {
10-
const {children, ...others} = this.props;
11-
const className = classNames({
10+
const {className, children, ...others} = this.props;
11+
const cls = classNames({
1212
'weui-panel__hd': true,
1313
[className]: className
1414
});
1515

1616
return (
17-
<div className={className} {...others}>{children}</div>
17+
<div className={cls} {...others}>{children}</div>
1818
);
1919
}
20-
};
20+
};

0 commit comments

Comments
 (0)