Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/remove unknown props #5372

Merged
merged 11 commits into from
May 28, 2019
8 changes: 5 additions & 3 deletions src/core/components/layout-utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,15 @@ export class Button extends React.Component {
mod: "primary"
}

defaultClasses = () => !this.props.unstyled ? `sui-btn sui-btn--${this.props.mod}` : ""
defaultClasses = ({ unstyled, mod }) => !unstyled ? `sui-btn sui-btn--${mod}` : ""

render() {
const { unstyled, mod, className, ...props } = this.props

return (
<button
{...this.props}
className={xclass(this.props.className, this.defaultClasses())}
{...props}
className={xclass(className, this.defaultClasses({ unstyled, mod }))}
/>
)
}
Expand Down