Skip to content

Commit

Permalink
feat(loader): default color for the loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Vojtěch Šimko committed Jun 18, 2018
1 parent 7cc7b35 commit c358ff0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/loader/Loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,24 @@ export default class Loader extends React.PureComponent {
}

render() {
let helper = this.context.$Utils.$UIComponentHelper;
const helper = this.context.$Utils.$UIComponentHelper;
const { className, mode, layout, color = 'black' } = this.props;

return (
<div
className={helper.cssClasses(
{
'atm-loader': true,
['atm-loader-' + this.props.mode]: this.props.mode,
['atm-loader-' + this.props.layout]: this.props.layout
['atm-loader-' + mode]: mode,
['atm-loader-' + layout]: layout
},
this.props.className
className
)}
{...helper.getDataProps(this.props)}>
<div
className={helper.cssClasses({
'atm-loader-animation': true,
['atm-loader-animation-' + this.props.color]: this.props.color
['atm-loader-animation-' + color]: color
})}
/>
</div>
Expand Down

0 comments on commit c358ff0

Please sign in to comment.