react package to show time interval
npm install time-progress-bar
3.9KB 1.5KB
npm install --save time-progress-bar
yarn add time-progress-bar
jsx
<>
hourBar="primary"
data={[
{ start: "03:25:53", end: "8:06:00" },
{ start: "09:25:53", end: "13:06:00", color: "red" },
{ start: "14:25:53", end: "19:06:00" },
]}
/>
hourBar="tertiary"
data={[{ start: "03:25:53", end: "13:06:00", color: "gold" }]}
/>
className="some-classes"
style={{ height: 60, paddingTop: 20 }}
backgroundColor="#dff9fb"
props={{
style: { height: 11 },
onClick: () => console.log("root"),
// ...can set all root element props
}}
hourBar={
<>
6 am
6 pm
>
}
data={[
{
start: "03:25:53",
end: "13:06:00",
color: "#22a6b3",
className: "some-class",
/*
.some-class:hover .timebar-box div {
display: block !important;
}
*/
style: { cursor: "pointer" },
children: (
style={{
position: "absolute",
top: -45,
left: 7.5,
display: "none",
padding: 6,
backgroundColor: "#dff9fb",
}}
>
Working time
DOCs:
#
$3
className => string ( default: "" )
set className for time-progress-bar container
style => undefined(default) or object
set style for time-progress-bar container
backgroundColor => set backgroundColor for root (default: "#F5F6F8")
props => ...can set all root element props
hourBar
- primary
- secondary(default)
- tertiary
- custom components( 12 `)