@reecelucas/react-datepicker
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@reecelucas/react-datepicker", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "An accessible, internationalizable React datepicker", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -30,2 +30,3 @@ # react-datepicker | ||
* [`DatePickeTable`](#DatePickeTable) | ||
* [Styling](#styling) | ||
* [LICENSE](#LICENSE) | ||
@@ -332,4 +333,37 @@ | ||
## Styling | ||
`react-datepicker` doesn't provide any default styling; you're free to do what you want and use what you want. | ||
```jsx | ||
// Example using CSS Modules | ||
import * as styles from './styles'; | ||
<DatePicker | ||
className={styles.wrapper} | ||
onSelect={date => console.log(date)} | ||
> | ||
<DatePickerInput className={styles.input} /> | ||
<DatePickerCalendar> | ||
<DatePickerMonth className={styles.selectedMonth} /> | ||
<DatePickerButton | ||
className={styles.button} | ||
updateMonth={({ prev }) => prev()} | ||
> | ||
Prev Month | ||
</DatePickerButton> | ||
<DatePickerButton | ||
className={styles.button} | ||
updateMonth={({ next }) => next()} | ||
> | ||
Next Month | ||
</DatePickerButton> | ||
<DatePickerTable className={styles.table} /> | ||
</DatePickerCalendar> | ||
</DatePicker> | ||
``` | ||
## LICENSE | ||
[MIT](./LICENSE) |
81001
368