프로젝트
GitHub에서 보기
catc/react-timekeeper
소개
Google Keep 앱에서 영감을 받은 React용 시간 선택기 :clock4:
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
React Timekeeper
Time picker based on the style of the Android Google Keep app.
Features
- supports both 12 hour and 24 hour mode, and flexible time formats
- simple to use with many customizable options
- smooth, beautiful animations with react spring
- typescript support
- css variable support for custom styles
Installation
$ yarn add react-timekeeper
# or via npm
$ npm install --save react-timekeeper
Version 2+ of timekeeper requires react hooks (v16.8). If you're using an older version of react, install timekeeper v1 via
$ npm install --save react-timekeeper@^1.0.0
Usage
import React, {useState} from 'react';
import TimeKeeper from 'react-timekeeper';
function YourComponent(){
const [time, setTime] = useState('12:34pm')
return (
<div>
<TimeKeeper
time={time}
onChange={(data) => setTime(data.formatted12)}
/>
<span>Time is {time}</span>
</div>
)
}
All styles are inlined via emotion so no css imports are required.
API
For full api and examples, see API docs and examples
Development
- Clone the repo
nvm use v12.16.0(or anything >12+)yarn install- may also need to install react since it's a peer dev:
yarn add -P react react-dom
- may also need to install react since it's a peer dev:
npm run docs:dev- Navigate to
localhost:3002
Contributing
Before submitting a PR, ensure that:
- you follow all eslint rules (should be automatic)
- all tests pass via
npm run tests - everything builds
- docs -
npm run docs:build - lib -
npm run lib
- docs -
- provide detailed info on what bug you're fixing or feature you're adding - if possible include a screenshot/gif
Other useful commands:
- new npm releases:
- bump version:
npm version NEW_VERSION, commit and push - CI should publish to npm automatically
- bump version:
- new github releases
- manual (TODO - add github action)
관련 프로젝트 살펴보기
불러오는 중…