We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e73263b + f13a0ed commit 2884b07Copy full SHA for 2884b07
1 file changed
src/FlatButton/FlatButton.js
@@ -213,13 +213,14 @@ class FlatButton extends Component {
213
const labelStyleIcon = {};
214
215
if (icon) {
216
+ const iconStyles = Object.assign({
217
+ verticalAlign: 'middle',
218
+ marginLeft: label && labelPosition !== 'before' ? 12 : 0,
219
+ marginRight: label && labelPosition === 'before' ? 12 : 0,
220
+ }, icon.props.style);
221
iconCloned = React.cloneElement(icon, {
222
color: icon.props.color || mergedRootStyles.color,
- style: {
- verticalAlign: 'middle',
- marginLeft: label && labelPosition !== 'before' ? 12 : 0,
- marginRight: label && labelPosition === 'before' ? 12 : 0,
- },
223
+ style: iconStyles,
224
});
225
226
if (labelPosition === 'before') {
0 commit comments