Skip to content

Commit 595cc08

Browse files
author
David Emory
committed
feat(form): Enhancements to PlanTripButton for TriMet mobile UI
Add option for custom button text. Add css class.
1 parent 7f17239 commit 595cc08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/components/form/plan-trip-button.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ import { planTrip } from '../../actions/api'
66

77
class PlanTripButton extends Component {
88
static propTypes = {
9-
onClick: PropTypes.func
9+
onClick: PropTypes.func,
10+
text: PropTypes.string
1011
}
1112
_onClick = () => {
1213
this.props.planTrip()
1314
}
1415
render () {
1516
return (
1617
<Button
18+
className='plan-trip-button'
1719
onClick={this._onClick || this.props.onClick}
18-
>Plan Trip</Button>
20+
>{this.props.text || 'Plan Trip'}</Button>
1921
)
2022
}
2123
}

0 commit comments

Comments
 (0)