forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Datepicker] Redesign as per material spec
Redesign the current Datepicker as per material design spec. This PR deals with the following: - [ ] Fixes left pane length - [ ] Fixes Font weight of left pane date - [ ] Action buttons are part of calender - [ ] Action buttons in the year container - [ ] Vertical Spacing in calendar Month reduced - [ ] Aligned left and right arrows with days of week - [ ] Flex design in calender toolbar - [ ] Incorporated flex design for the overall calender and datepicker - [ ] Fix both dialog and inline calendar - [ ] Changed year Selector in Year Container as per Material Spec. Closes mui#3603 Closes mui#3740 Closes mui#1489 Closes callemall/material-ui#3786
- Loading branch information
1 parent
014476d
commit 5eca457
Showing
12 changed files
with
327 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React from 'react'; | ||
import FlatButton from '../FlatButton'; | ||
|
||
class CalendarActionButton extends React.Component { | ||
static propTypes = { | ||
cancelLabel: React.PropTypes.node, | ||
okLabel: React.PropTypes.node, | ||
onTouchTapCancel: React.PropTypes.func, | ||
onTouchTapOk: React.PropTypes.func, | ||
wordings: React.PropTypes.object, | ||
}; | ||
|
||
render() { | ||
const {cancelLabel, okLabel, wordings} = this.props; | ||
|
||
const styles = { | ||
root: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'flex-end', | ||
margin: 0, | ||
padding: 0, | ||
maxHeight: 48, | ||
}, | ||
flatButtons: { | ||
minWidth: 64, | ||
maxHeight: 36, | ||
padding: 0, | ||
fontsize: 14, | ||
margin: '4px 8px 8px 0px', | ||
}, | ||
}; | ||
|
||
return ( | ||
<div style={styles.root} > | ||
<FlatButton | ||
key={0} | ||
label={wordings ? wordings.cancel : cancelLabel} | ||
primary={true} | ||
style={styles.flatButtons} | ||
onTouchTap={this.props.onTouchTapCancel} | ||
/> | ||
<FlatButton | ||
key={1} | ||
label={wordings ? wordings.ok : okLabel} | ||
primary={true} | ||
disabled={this.refs.calendar !== undefined && this.refs.calendar.isSelectedDateDisabled()} | ||
style={styles.flatButtons} | ||
onTouchTap={this.props.onTouchTapOk} | ||
/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default CalendarActionButton; |
Oops, something went wrong.