Skip to content

Commit 66f7a30

Browse files
committed
init date picker
1 parent f043bb8 commit 66f7a30

File tree

10 files changed

+109
-0
lines changed

10 files changed

+109
-0
lines changed

packages/date-picker/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Date Picker
2+
3+
![npm (scoped)](https://img.shields.io/npm/v/@leafygreen-ui/date-picker.svg)
4+
5+
#### [View on MongoDB.design](https://www.mongodb.design/component/date-picker/example/)
6+
7+
## Installation
8+
9+
### Yarn
10+
11+
```shell
12+
yarn add @leafygreen-ui/date-picker
13+
```
14+
15+
### NPM
16+
17+
```shell
18+
npm install @leafygreen-ui/date-picker
19+
```

packages/date-picker/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "@leafygreen-ui/date-picker",
3+
"version": "0.1.0",
4+
"description": "LeafyGreen UI Kit Date Picker",
5+
"main": "./dist/index.js",
6+
"module": "./dist/esm/index.js",
7+
"types": "./dist/index.d.ts",
8+
"license": "Apache-2.0",
9+
"scripts": {
10+
"build": "lg build-package",
11+
"tsc": "lg build-ts",
12+
"docs": "lg build-tsdoc"
13+
},
14+
"publishConfig": {
15+
"access": "public"
16+
},
17+
"dependencies": {
18+
"@leafygreen-ui/emotion": "^4.0.4",
19+
"@leafygreen-ui/lib": "^10.4.0"
20+
},
21+
"homepage": "https://github.com/mongodb/leafygreen-ui/tree/main/packages/date-picker",
22+
"repository": {
23+
"type": "git",
24+
"url": "https://github.com/mongodb/leafygreen-ui"
25+
},
26+
"bugs": {
27+
"url": "https://jira.mongodb.org/projects/PD/summary"
28+
}
29+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react';
2+
import { StoryFn } from '@storybook/react';
3+
4+
import { DatePicker } from '.';
5+
6+
export default {
7+
title: 'Components/DatePicker',
8+
component: DatePicker,
9+
};
10+
11+
const Template: StoryFn<typeof DatePicker> = props => <DatePicker {...props} />;
12+
13+
export const Basic = Template.bind({});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
import { render } from '@testing-library/react';
3+
4+
import { DatePicker } from '.';
5+
6+
describe('packages/date-picker', () => {
7+
test('condition', () => {});
8+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { css } from '@leafygreen-ui/emotion';
2+
3+
export const baseStyles = css``;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
3+
// TODO: forwardRef
4+
export function DatePicker({}) {
5+
return <div>your content here</div>;
6+
}
7+
8+
DatePicker.displayName = 'DatePicker';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export interface DatePickerProps {}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { DatePicker } from './DatePicker';
2+
export { DatePickerProps } from './DatePicker.types';

packages/date-picker/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { DatePicker, DatePickerProps } from './DatePicker';

packages/date-picker/tsconfig.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": "@lg-tools/build/config/package.tsconfig.json",
3+
"compilerOptions": {
4+
"declarationDir": "dist",
5+
"outDir": "dist",
6+
"rootDir": "src",
7+
"baseUrl": ".",
8+
"paths": {
9+
"@leafygreen-ui/icon/dist/*": ["../icon/src/generated/*"],
10+
"@leafygreen-ui/*": ["../*/src"]
11+
}
12+
},
13+
"include": [
14+
"src/**/*"
15+
],
16+
"exclude": ["**/*.spec.*", "**/*.story.*"],
17+
"references": [
18+
{
19+
"path": "../emotion"
20+
},
21+
{
22+
"path": "../lib"
23+
}
24+
]
25+
}

0 commit comments

Comments
 (0)