forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mui#727 from dmtrKovalenko/lerna
[RFC] Move utils to separate package + Lerna
- Loading branch information
Showing
45 changed files
with
17,771 additions
and
9,321 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
File renamed without changes.
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,2 @@ | ||
PORT="3002" | ||
NODE_PATH="src/" |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,63 +1,59 @@ | ||
import React, { PureComponent } from 'react'; | ||
import Paper from '@material-ui/core/Paper'; | ||
|
||
// Make sure that for using static pickers you use path imports | ||
import BasePicker from 'material-ui-pickers/_shared/BasePicker'; | ||
import Calendar from 'material-ui-pickers/DatePicker/components/Calendar'; | ||
import TimePickerView from 'material-ui-pickers/TimePicker/components/TimePickerView'; | ||
import MuiPickersUtilsProvider from 'material-ui-pickers/MuiPickersUtilsProvider'; | ||
import DateFnsUtils from 'material-ui-pickers/utils/date-fns-utils'; | ||
|
||
/* eslint-disable no-unused-vars */ | ||
class StaticPickers extends PureComponent { | ||
state = { | ||
selectedDate: new Date(), | ||
} | ||
|
||
handleDateChange = (date) => { | ||
this.setState({ selectedDate: date }); | ||
} | ||
|
||
render() { | ||
const { selectedDate } = this.state; | ||
|
||
return ( | ||
// Also important to use path import for provider | ||
<MuiPickersUtilsProvider utils={DateFnsUtils}> | ||
<BasePicker value={selectedDate} onChange={this.handleDateChange}> | ||
{ | ||
({ | ||
date, | ||
handleAccept, | ||
handleChange, | ||
handleClear, | ||
handleDismiss, | ||
handleSetTodayDate, | ||
handleTextFieldChange, | ||
pick12hOr24hFormat, | ||
}) => ( | ||
<div> | ||
<div className="picker"> | ||
<Paper style={{ overflow: 'hidden' }}> | ||
<Calendar date={date} onChange={handleChange} /> | ||
</Paper> | ||
</div> | ||
|
||
<TimePickerView | ||
date={date} | ||
ampm={false} | ||
onHourChange={handleChange} | ||
type="hours" | ||
/> | ||
</div> | ||
) | ||
} | ||
</BasePicker> | ||
</MuiPickersUtilsProvider> | ||
); | ||
} | ||
} | ||
|
||
|
||
export default StaticPickers; | ||
|
||
// import React, { PureComponent } from "react"; | ||
// import Paper from "@material-ui/core/Paper"; | ||
|
||
// // Make sure that for using static pickers you use path imports | ||
// import BasePicker from "material-ui-pickers/_shared/BasePicker"; | ||
// import Calendar from "material-ui-pickers/DatePicker/components/Calendar"; | ||
// import TimePickerView from "material-ui-pickers/TimePicker/components/TimePickerView"; | ||
// import MuiPickersUtilsProvider from "material-ui-pickers/MuiPickersUtilsProvider"; | ||
// import DateFnsUtils from "material-ui-pickers/utils/date-fns-utils"; | ||
|
||
// /* eslint-disable no-unused-vars */ | ||
// class StaticPickers extends PureComponent { | ||
// state = { | ||
// selectedDate: new Date() | ||
// }; | ||
|
||
// handleDateChange = date => { | ||
// this.setState({ selectedDate: date }); | ||
// }; | ||
|
||
// render() { | ||
// const { selectedDate } = this.state; | ||
|
||
// return ( | ||
// // Also important to use path import for provider | ||
// <MuiPickersUtilsProvider utils={DateFnsUtils}> | ||
// <BasePicker value={selectedDate} onChange={this.handleDateChange}> | ||
// {({ | ||
// date, | ||
// handleAccept, | ||
// handleChange, | ||
// handleClear, | ||
// handleDismiss, | ||
// handleSetTodayDate, | ||
// handleTextFieldChange, | ||
// pick12hOr24hFormat | ||
// }) => ( | ||
// <div> | ||
// <div className="picker"> | ||
// <Paper style={{ overflow: "hidden" }}> | ||
// <Calendar date={date} onChange={handleChange} /> | ||
// </Paper> | ||
// </div> | ||
|
||
// <TimePickerView | ||
// date={date} | ||
// ampm={false} | ||
// onHourChange={handleChange} | ||
// type="hours" | ||
// /> | ||
// </div> | ||
// )} | ||
// </BasePicker> | ||
// </MuiPickersUtilsProvider> | ||
// ); | ||
// } | ||
// } | ||
|
||
// export default StaticPickers; |
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
Oops, something went wrong.