2.0.12 • Published 3 months ago
@zendeskgarden/container-schedule v2.0.12
@zendeskgarden/container-schedule
This package includes containers relating to schedule in the Garden Design System.
Installation
npm install @zendeskgarden/container-schedule
Usage
Check out storybook for live examples.
As a hook
The useSchedule
hook implements a schedule (timer) and communicates when it has elapsed.
import { useSchedule } from '@zendeskgarden/container-schedule';
const Animation = () => {
const elapsed = useSchedule({ duration: 1000, delayMS: 0 });
return <p>Percentage: {(elapsed * 100).toFixed(0)}%</p>;
};
As a Render Prop Component
import { ScheduleContainer } from '@zendeskgarden/container-schedule';
<ScheduleContainer duration={1000} delayMS={0}>
{elapsed => <p>Percentage: {(elapsed * 100).toFixed(0)}%</p>}
</ScheduleContainer>;
Info
See react-loaders component as a non-trivial use of this.
2.0.12
3 months ago
2.0.11
3 months ago
2.0.10
5 months ago
2.0.9
10 months ago
2.0.7
1 year ago
2.0.8
1 year ago
2.0.6
1 year ago
2.0.5
2 years ago
2.0.4
2 years ago
2.0.2
2 years ago
1.3.12
3 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.3.10
3 years ago
1.3.11
3 years ago
1.3.9
3 years ago
1.3.8
4 years ago
1.3.7
4 years ago
1.3.6
4 years ago
1.3.5
4 years ago
1.3.4
5 years ago
1.3.3
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.0
5 years ago
0.3.0
6 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.0
6 years ago