Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Date picker #169

Merged
merged 5 commits into from
Jul 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions .storybook/Story.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
background-color: $g4-onyx;
color: $g9-mountain;
overflow: hidden;

> span {
position: absolute;
top: 50%;
Expand Down Expand Up @@ -200,12 +200,26 @@
*/

$docs-text-base: 14px;
$docs-text-scale: 1.19;
$docs-text-scale: 1.19;
$docs-text-base-1: (ceil($docs-text-base * $docs-text-scale));
$docs-text-base-2: (ceil($docs-text-base * $docs-text-scale * $docs-text-scale));
$docs-text-base-3: (ceil($docs-text-base * $docs-text-scale * $docs-text-scale * $docs-text-scale));
$docs-text-base-4: (ceil($docs-text-base * $docs-text-scale * $docs-text-scale * $docs-text-scale * $docs-text-scale));
$docs-text-base-5: (ceil($docs-text-base * $docs-text-scale * $docs-text-scale * $docs-text-scale * $docs-text-scale * $docs-text-scale));
$docs-text-base-2: (
ceil($docs-text-base * $docs-text-scale * $docs-text-scale)
);
$docs-text-base-3: (
ceil($docs-text-base * $docs-text-scale * $docs-text-scale * $docs-text-scale)
);
$docs-text-base-4: (
ceil(
$docs-text-base * $docs-text-scale * $docs-text-scale * $docs-text-scale *
$docs-text-scale
)
);
$docs-text-base-5: (
ceil(
$docs-text-base * $docs-text-scale * $docs-text-scale * $docs-text-scale *
$docs-text-scale * $docs-text-scale
)
);

body.sb-show-main {
padding: 52px;
Expand Down Expand Up @@ -236,7 +250,7 @@ body.sb-show-main {
color: $c-hydrogen;
text-shadow: 0 0 3px $c-ocean, 0 0 7px $c-amethyst;
}

h1,
h2,
h3,
Expand Down Expand Up @@ -304,7 +318,8 @@ body.sb-show-main {
line-height: 1.55em;
font-weight: 500;

b,strong {
b,
strong {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading this as "be strong", don't tell me how to live my life CSS!

font-weight: 900;
}

Expand Down Expand Up @@ -535,22 +550,22 @@ table.two-axis-table {
border-radius: $cf-radius;
position: relative;
padding: 8px;

p {
opacity: 0.6;
margin: 0;
font-size: 13px;
font-weight: 700;

&.colors-grid--hex {
text-transform: uppercase;
}
}

&.dark-text > p {
color: $g0-obsidian !important;
}

&.light-text > p {
color: $g20-white !important;
}
Expand Down Expand Up @@ -594,7 +609,6 @@ table.two-axis-table {
flex: 0 0 calc(33.3333% - 4px);
}


.icon-grid {
display: flex;
flex-wrap: wrap;
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### 0.0.17 [Unreleassed]

- [#169](https://github.com/influxdata/clockface/pull/169): Introduce `DatePicker` and `DateRangePicker` components
- [#166](https://github.com/influxdata/clockface/pull/166): Add markdown documentation for `ClickOutside`, `DapperScrollbars`, `DraggableResizer`, and `WaitingText`
- [#165](https://github.com/influxdata/clockface/pull/165): Add markdown documentation for and polish appearance of `SlideToggle` components

Expand Down
82 changes: 71 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@types/lodash": "^4.14.123",
"@types/marked": "^0.6.5",
"@types/react": "^16.4.14",
"@types/react-datepicker": "^2.3.0",
"@types/react-dom": "^16.8.3",
"@types/storybook-readme": "^5.0.2",
"@types/storybook__addon-info": "^4.1.0",
Expand All @@ -45,9 +46,11 @@
"markdown-loader": "^5.0.0",
"marked": "^0.6.2",
"microbundle": "^0.11.0",
"moment": "^2.24.0",
"node-sass": "^4.11.0",
"prettier": "^1.16.4",
"raw-loader": "^2.0.0",
"react-datepicker": "^2.8.0",
"react-docgen-typescript-loader": "^3.0.1",
"react-docgen-typescript-webpack-plugin": "^1.1.0",
"release-it": "^10.3.1",
Expand Down
27 changes: 27 additions & 0 deletions src/Components/DatePicker/Base/DatePicker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Date Picker

This is a date picker that allows a user to select a date from a calendar.

### Usage

```jsx
import {DatePicker} from '@influxdata/clockface'
```

```jsx
<DatePicker
dateTime={'1234567890'}
onSelectDate={() => {}}
label={'my label'}
/>
```

### Example

<!-- STORY -->

<!-- STORY HIDE START -->

<!-- STORY HIDE END -->

<!-- PROPS -->
Loading