-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathWithPointer.tsx
More file actions
28 lines (26 loc) · 879 Bytes
/
WithPointer.tsx
File metadata and controls
28 lines (26 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React from 'react';
import ProgressBar from 'react-customizable-progressbar';
import { ExampleProps } from './Examples';
import ExampleCard from './ExampleCard';
const WithPointer = ({ progress }: ExampleProps) => (
<ExampleCard
title="With pointer"
href="https://github.com/martyan/react-customizable-progressbar/blob/master/examples/src/WithPointer.tsx"
>
<ProgressBar
radius={100}
progress={progress}
strokeWidth={4}
strokeColor="indianred"
trackStrokeWidth={4}
pointerRadius={8}
pointerStrokeWidth={5}
pointerStrokeColor="indianred"
>
<div className="flex items-center justify-center text-center absolute top-0 w-full h-full m-auto text-[2.2em] font-thin text-[#555] select-none">
<div>{progress}%</div>
</div>
</ProgressBar>
</ExampleCard>
);
export default WithPointer;