DocSpace-buildtools/packages/components/time-picker/README.md
2023-05-15 03:35:00 +05:00

29 lines
1.3 KiB
Markdown

# TimePicker
Time input
### Usage
```js
import TimePicker from "@docspace/components/time-picker";
```
```jsx
<TimePicker
date={new Date()}
setDate={setDate}
hasError={true}
onChange={(date) => console.log(date)}
/>
```
#### Properties
| Props | Type | Required | Values | Default | Description |
| -------------- | :------------: | :------: | :-----------: | :-----------------------: | ------------------------------------------------------------ |
| `className` | `string` | - | - | '' | Allows to set classname |
| `date` | `object` | - | - | - | Inital date |
| `setDate` | `func` | - | - | - | State setter function |
| `onChange` | `func` | - | - | - | Allow you to handle changing events of component |
| `hasError` | `bool` | - | - | false | Indicates error |