Skip to content

Commit 19d4b07

Browse files
committed
feat: allow styling of div which wraps the Datepicker component
1 parent 4fbfb6b commit 19d4b07

File tree

10 files changed

+35
-27
lines changed

10 files changed

+35
-27
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ prop name | type | default
2121
`format` | `string` \| `function` | `'#{m}/#{d}/#{Y}'`
2222
`daysOfWeek` | `array` | En-US Locale (see below)
2323
`monthsOfYear` | `array` | En-US Locale (see below)
24+
`style` | `string` | ""
2425

2526
### `start` and `end`
2627
These properties set the minimum and maximum dates that will be rendered by this calendar. It is **highly** recommended that you do not leave these as their defaults and supply values which suit your application's needs.
@@ -66,6 +67,9 @@ export let monthsOfYear = [
6667
];
6768
```
6869

70+
### `style`
71+
This prop allows you to style the div which wraps the Datepicker component. This can be useful, for instance, if you'd like to do something like make the component full-width or `display: block;` (by default the element is `inline-block`). If you would like to style the button that triggers the opening of the datepicker we recommend you pass a custom element (button/link/etc) to the component via its default slot.
72+
6973
### Kitchen Sink Example:
7074
```html
7175
<script>

Diff for: docs/bundle.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/bundle.css.map

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/bundle.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/test.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)