-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[FlatButton] Add labelPosition prop. #1286
Conversation
type: 'string', | ||
header: 'default: "right"', | ||
desc: 'Place label before or after the passed children' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing comma here.
@hai-cea good catch, fixed! |
@@ -26,6 +26,7 @@ let FlatButton = React.createClass({ | |||
disabled: React.PropTypes.bool, | |||
hoverColor: React.PropTypes.string, | |||
label: validateLabel, | |||
labelPosition: React.PropTypes.oneOf(['left', 'right']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should be one of before
or after
. Since that is a truer indication of what it's doing.
94f3278
to
2e4198a
Compare
+1 Rebased, renamed to "before" and "after" and made |
[FlatButton] Add labelPosition prop.
Thanks @vaiRk |
I have just tested the feature. I have an issue. I think that labelPosition should default to |
At the moment FlatButtons always render the label before any passed children.
I've added a
labelPosition
prop to allow changing the order of the elements.Defaults to
right
as I thought the most common use is adding a FontIcon or similar which is normally placed on the left hand side of the button.