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

Added block prop to Raised Button #927

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/src/app/components/pages/components/buttons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ class ButtonPage extends React.Component {
{
name: 'Raised Button',
infoArray: [
{
name: 'fullWidth',
type: 'bool',
header: 'optional',
desc: 'If true, will change the width of the button to span the full width of the parent.'
},
{
name: 'containerElement',
type: 'oneOfType [string, element]',
Expand Down Expand Up @@ -404,6 +410,9 @@ class ButtonPage extends React.Component {
<RaisedButton label="Disabled" disabled={true} />
</div>
</div>
<div>
<RaisedButton label="Block Button" fullWidth={true} />
</div>
</ComponentDoc>
</Tab>
<Tab label="Floating Action Buttons">
Expand Down
3 changes: 2 additions & 1 deletion src/raised-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ let RaisedButton = React.createClass({
primary: React.PropTypes.bool,
secondary: React.PropTypes.bool,
labelStyle: React.PropTypes.object,
fullWidth: React.PropTypes.bool
},

getInitialState: function() {
Expand Down Expand Up @@ -81,7 +82,7 @@ let RaisedButton = React.createClass({
let styles = {
root: {
display: 'inline-block',
minWidth: this.getThemeButton().minWidth,
minWidth: this.props.fullWidth ? '100%' : this.getThemeButton().minWidth,
height: this.getThemeButton().height,
transition: Transitions.easeOut()
},
Expand Down