yuai-time-input
v0.0.2
Published
React time input components with styled-components
Downloads
8
Maintainers
Readme
yuai-time-input
React time input components with styled-components
Install
yarn install yuai-time-input react styled-components
Components
TimeInput
import * as React from 'react';
import styled from 'styled-components';
import { TimeInput, Option } from 'yuai-time-input';
const StyledTimeInput = styled(TimeInput)`
border-radius: 5px;
padding: 9px 15px;
`;
const HelloWorld = () => {
const [ time, setTime ] = React.useState<Date | null>(null);
const onChange = (date: Date | null) => setTime(date));
return (
<StyledTimeInput required value={time} onChange={onChange} />
);
};
License
MIT