-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathFormatter.tsx
More file actions
31 lines (30 loc) · 855 Bytes
/
Copy pathFormatter.tsx
File metadata and controls
31 lines (30 loc) · 855 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
29
30
31
import React from 'react';
import { Flex, Statistic } from '@tiny-design/react';
export default function FormatterDemo() {
return (
<Flex gap="lg" wrap="wrap">
<Statistic
title="Compact Number"
value={3498200}
format={{ type: 'compact', maximumFractionDigits: 1 }}
size="sm"
/>
<Statistic
title="German Revenue"
value={1128930.5}
format={{ type: 'currency', currency: 'EUR', locale: 'de-DE', maximumFractionDigits: 2 }}
/>
<Statistic
title="API Latency"
value={184}
format={{ type: 'duration', durationUnit: 'ms' }}
/>
<Statistic
title="Fulfillment Rate"
value={0.9962}
format={{ type: 'percent', signDisplay: 'exceptZero', maximumFractionDigits: 2 }}
suffix=" SLA"
/>
</Flex>
);
}