diff --git a/src/routes/statistic/+page.svelte b/src/routes/statistic/+page.svelte index 5aa8944f..b37a9b31 100644 --- a/src/routes/statistic/+page.svelte +++ b/src/routes/statistic/+page.svelte @@ -1,13 +1,14 @@ - - - + +
+ + Total Likes + + {formatNumber(25660000, { + style: 'decimal', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + +
+ +
+ + +
+ + + Total Likes + + {formatNumber(25660000, { + style: 'decimal', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + +
+ +
+ + +
+ + New Users + + {formatNumber(82001, { + style: 'decimal', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + + +
+ +
+ + +
+ Total Likes @@ -44,28 +98,15 @@ minimumFractionDigits: 1 })} - - {formatNumber(-2000000, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} ({formatNumber(-0.0723, { - style: 'percent' - })}) - +
+ +
-
- - -
- - - - - + +
+ Page Views @@ -98,59 +139,13 @@ +
+ +
-
- - -
- - - - - - - New Users - - {formatNumber(82001, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - - -
- - -
- - - - - - - Total Likes - - {formatNumber(25660000, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - -
- - -
- - - - - + +
+ Page Views @@ -186,70 +181,28 @@ +
+ +
-
- - -
- - - - - - New Users - - {formatNumber(82001, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - - -
- - -
- + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + diff --git a/src/routes/statistic/examples.ts b/src/routes/statistic/examples.ts index 11692fd5..ebff0377 100644 --- a/src/routes/statistic/examples.ts +++ b/src/routes/statistic/examples.ts @@ -1,5 +1,14 @@ import type { Slot, Prop } from '../../docs'; +export const props: Prop[] = [ + { + id: '1', + prop: 'bordered', + type: 'boolean', + default: 'true' + } +]; + export const slots: Slot[] = [ { id: '1', @@ -201,189 +210,178 @@ export const trendIconProps: Prop[] = [ } ]; -export const example1 = ` +export const example = ` - - Total Likes - - {formatNumber(25660000, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - - Last Year: {formatNumber(27660000, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - {formatNumber(-2000000, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} ({formatNumber(-0.0723, { - style: 'percent' - })}) - - + Total Likes + + {formatNumber(25660000, { + style: 'decimal', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + `; -export const example2 = ` +export const exampleIcon = ` - - Page Views - - {formatNumber(2660000, { - style: 'currency', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - - Last Year: {formatNumber(2580000, { - style: 'currency', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - - {formatNumber(80000, { - style: 'currency', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} ({formatNumber(0.031, { - style: 'percent' - })}) - - + + Total Likes + + {formatNumber(25660000, { + style: 'decimal', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + `; -export const example3 = ` +export const exampleProgress = ` - - New Users - - {formatNumber(82001, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - + New Users + + {formatNumber(82001, { + style: 'decimal', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + `; -export const example4 = ` +export const exampleComparison = ` - - Total Likes - - {formatNumber(25660000, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - + + Total Likes + + {formatNumber(25660000, { + style: 'decimal', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + + + Last Year: {formatNumber(27660000, { + style: 'decimal', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + `; -export const example5 = ` +export const exampleTrend = ` - - - Page Views - - {formatNumber(2660000, { - style: 'currency', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - - Last Year: {formatNumber(2580000, { - style: 'currency', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - - {formatNumber(80000, { - style: 'currency', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} ({formatNumber(0.031, { - style: 'percent' - })}) - - + + + Page Views + + {formatNumber(2660000, { + style: 'currency', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + + + Last Year: {formatNumber(2580000, { + style: 'currency', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + + + {formatNumber(80000, { + style: 'currency', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} ({formatNumber(0.031, { + style: 'percent' + })}) + + `; -export const example6 = ` +export const exampleCustom = ` - - New Users - - {formatNumber(82001, { - style: 'decimal', - notation: 'compact', - maximumFractionDigits: 1, - minimumFractionDigits: 1 - })} - - + + + Page Views + + {formatNumber(2660000, { + style: 'currency', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + + + Last Year: {formatNumber(2580000, { + style: 'currency', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} + + + {formatNumber(80000, { + style: 'currency', + notation: 'compact', + maximumFractionDigits: 1, + minimumFractionDigits: 1 + })} ({formatNumber(0.031, { + style: 'percent' + })}) + + `;