mirror of https://github.com/ghostfolio/ghostfolio
Karel De Smet
2 weeks ago
committed by
GitHub
9 changed files with 390 additions and 379 deletions
@ -1,235 +1,234 @@ |
|||||
import { CommonModule } from '@angular/common'; |
import { CommonModule } from '@angular/common'; |
||||
import { Meta, Story, moduleMetadata } from '@storybook/angular'; |
import { moduleMetadata } from '@storybook/angular'; |
||||
|
import type { Meta, StoryObj } from '@storybook/angular'; |
||||
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
||||
|
|
||||
import { LineChartComponent } from './line-chart.component'; |
import { GfLineChartComponent } from './line-chart.component'; |
||||
|
|
||||
export default { |
export default { |
||||
title: 'Line Chart', |
title: 'Line Chart', |
||||
component: LineChartComponent, |
component: GfLineChartComponent, |
||||
decorators: [ |
decorators: [ |
||||
moduleMetadata({ |
moduleMetadata({ |
||||
declarations: [LineChartComponent], |
imports: [CommonModule, GfLineChartComponent, NgxSkeletonLoaderModule] |
||||
imports: [CommonModule, NgxSkeletonLoaderModule] |
|
||||
}) |
}) |
||||
] |
] |
||||
} as Meta<LineChartComponent>; |
} as Meta<GfLineChartComponent>; |
||||
|
|
||||
const Template: Story<LineChartComponent> = (args: LineChartComponent) => ({ |
type Story = StoryObj<GfLineChartComponent>; |
||||
props: args |
|
||||
}); |
|
||||
|
|
||||
export const Simple = Template.bind({}); |
export const Simple: Story = { |
||||
Simple.args = { |
args: { |
||||
historicalDataItems: [ |
historicalDataItems: [ |
||||
{ |
{ |
||||
date: '2017-01-01', |
date: '2017-01-01', |
||||
value: 2561.60376 |
value: 2561.60376 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-02-01', |
date: '2017-02-01', |
||||
value: 2261.60376 |
value: 2261.60376 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-03-01', |
date: '2017-03-01', |
||||
value: 2268.68157074 |
value: 2268.68157074 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-04-01', |
date: '2017-04-01', |
||||
value: 2525.2942 |
value: 2525.2942 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-05-01', |
date: '2017-05-01', |
||||
value: 2929.3595107399997 |
value: 2929.3595107399997 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-06-01', |
date: '2017-06-01', |
||||
value: 3088.5172438900004 |
value: 3088.5172438900004 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-07-01', |
date: '2017-07-01', |
||||
value: 3281.2490946300004 |
value: 3281.2490946300004 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-08-01', |
date: '2017-08-01', |
||||
value: 4714.57822537 |
value: 4714.57822537 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-09-01', |
date: '2017-09-01', |
||||
value: 5717.262455259565 |
value: 5717.262455259565 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-10-01', |
date: '2017-10-01', |
||||
value: 5338.742482334544 |
value: 5338.742482334544 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-11-01', |
date: '2017-11-01', |
||||
value: 6361.263771554509 |
value: 6361.263771554509 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2017-12-01', |
date: '2017-12-01', |
||||
value: 8373.260491904595 |
value: 8373.260491904595 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-01-01', |
date: '2018-01-01', |
||||
value: 9783.208968191562 |
value: 9783.208968191562 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-02-01', |
date: '2018-02-01', |
||||
value: 7841.2667100173 |
value: 7841.2667100173 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-03-01', |
date: '2018-03-01', |
||||
value: 8582.133039380678 |
value: 8582.133039380678 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-04-01', |
date: '2018-04-01', |
||||
value: 5901.8362986766715 |
value: 5901.8362986766715 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-05-01', |
date: '2018-05-01', |
||||
value: 7367.392976151925 |
value: 7367.392976151925 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-06-01', |
date: '2018-06-01', |
||||
value: 6490.164314049853 |
value: 6490.164314049853 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-07-01', |
date: '2018-07-01', |
||||
value: 6365.351621654618 |
value: 6365.351621654618 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-08-01', |
date: '2018-08-01', |
||||
value: 6614.532706931272 |
value: 6614.532706931272 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-09-01', |
date: '2018-09-01', |
||||
value: 6402.052882414409 |
value: 6402.052882414409 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-10-01', |
date: '2018-10-01', |
||||
value: 15270.327917651943 |
value: 15270.327917651943 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-11-01', |
date: '2018-11-01', |
||||
value: 13929.833891940816 |
value: 13929.833891940816 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2018-12-01', |
date: '2018-12-01', |
||||
value: 12995.832254431414 |
value: 12995.832254431414 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-01-01', |
date: '2019-01-01', |
||||
value: 11792.447013828998 |
value: 11792.447013828998 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-02-01', |
date: '2019-02-01', |
||||
value: 11988.224284346446 |
value: 11988.224284346446 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-03-01', |
date: '2019-03-01', |
||||
value: 13536.39667099519 |
value: 13536.39667099519 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-04-01', |
date: '2019-04-01', |
||||
value: 14301.83740090022 |
value: 14301.83740090022 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-05-01', |
date: '2019-05-01', |
||||
value: 14902.994910520581 |
value: 14902.994910520581 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-06-01', |
date: '2019-06-01', |
||||
value: 15373.418326284132 |
value: 15373.418326284132 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-07-01', |
date: '2019-07-01', |
||||
value: 17545.70705465703 |
value: 17545.70705465703 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-08-01', |
date: '2019-08-01', |
||||
value: 17206.28500223782 |
value: 17206.28500223782 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-09-01', |
date: '2019-09-01', |
||||
value: 17782.445200108898 |
value: 17782.445200108898 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-10-01', |
date: '2019-10-01', |
||||
value: 17050.25875252655 |
value: 17050.25875252655 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-11-01', |
date: '2019-11-01', |
||||
value: 18517.053521416237 |
value: 18517.053521416237 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2019-12-01', |
date: '2019-12-01', |
||||
value: 17850.649021651363 |
value: 17850.649021651363 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-01-01', |
date: '2020-01-01', |
||||
value: 18817.269786559067 |
value: 18817.269786559067 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-02-01', |
date: '2020-02-01', |
||||
value: 22769.842312027653 |
value: 22769.842312027653 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-03-01', |
date: '2020-03-01', |
||||
value: 23065.56002316582 |
value: 23065.56002316582 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-04-01', |
date: '2020-04-01', |
||||
value: 19738.122641884733 |
value: 19738.122641884733 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-05-01', |
date: '2020-05-01', |
||||
value: 25112.281463810643 |
value: 25112.281463810643 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-06-01', |
date: '2020-06-01', |
||||
value: 28753.054132147452 |
value: 28753.054132147452 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-07-01', |
date: '2020-07-01', |
||||
value: 32207.62827031543 |
value: 32207.62827031543 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-08-01', |
date: '2020-08-01', |
||||
value: 37837.88816828611 |
value: 37837.88816828611 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-09-01', |
date: '2020-09-01', |
||||
value: 50018.740185519295 |
value: 50018.740185519295 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-10-01', |
date: '2020-10-01', |
||||
value: 46593.322295801525 |
value: 46593.322295801525 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-11-01', |
date: '2020-11-01', |
||||
value: 44440.18743231742 |
value: 44440.18743231742 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2020-12-01', |
date: '2020-12-01', |
||||
value: 57582.23077536893 |
value: 57582.23077536893 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2021-01-01', |
date: '2021-01-01', |
||||
value: 68823.02446077733 |
value: 68823.02446077733 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2021-02-01', |
date: '2021-02-01', |
||||
value: 64516.42092139593 |
value: 64516.42092139593 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2021-03-01', |
date: '2021-03-01', |
||||
value: 82465.97581106682 |
value: 82465.97581106682 |
||||
}, |
}, |
||||
{ |
{ |
||||
date: '2021-03-18', |
date: '2021-03-18', |
||||
value: 86666.03082624623 |
value: 86666.03082624623 |
||||
} |
} |
||||
], |
], |
||||
isAnimated: true |
isAnimated: true |
||||
|
} |
||||
}; |
}; |
||||
|
@ -1,30 +1,32 @@ |
|||||
import { Meta, Story, moduleMetadata } from '@storybook/angular'; |
import { moduleMetadata } from '@storybook/angular'; |
||||
|
import type { Meta, StoryObj } from '@storybook/angular'; |
||||
|
|
||||
import { LogoComponent } from './logo.component'; |
import { GfLogoComponent } from './logo.component'; |
||||
|
|
||||
export default { |
export default { |
||||
title: 'Logo', |
title: 'Logo', |
||||
component: LogoComponent, |
component: GfLogoComponent, |
||||
decorators: [ |
decorators: [ |
||||
moduleMetadata({ |
moduleMetadata({ |
||||
imports: [] |
imports: [] |
||||
}) |
}) |
||||
] |
] |
||||
} as Meta<LogoComponent>; |
} as Meta<GfLogoComponent>; |
||||
|
|
||||
const Template: Story<LogoComponent> = (args: LogoComponent) => ({ |
type Story = StoryObj<GfLogoComponent>; |
||||
props: args |
|
||||
}); |
|
||||
|
|
||||
export const Default = Template.bind({}); |
export const Default: Story = { |
||||
Default.args = {}; |
args: {} |
||||
|
}; |
||||
|
|
||||
export const Large = Template.bind({}); |
export const Large: Story = { |
||||
Large.args = { |
args: { |
||||
size: 'large' |
size: 'large' |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
export const NoLabel = Template.bind({}); |
export const NoLabel: Story = { |
||||
NoLabel.args = { |
args: { |
||||
showLabel: false |
showLabel: false |
||||
|
} |
||||
}; |
}; |
||||
|
@ -1,25 +1,23 @@ |
|||||
import { GfLogoModule } from '@ghostfolio/ui/logo'; |
import { GfLogoComponent } from '@ghostfolio/ui/logo'; |
||||
|
|
||||
import { RouterTestingModule } from '@angular/router/testing'; |
import { RouterTestingModule } from '@angular/router/testing'; |
||||
import { Meta, Story, moduleMetadata } from '@storybook/angular'; |
import { moduleMetadata } from '@storybook/angular'; |
||||
|
import type { Meta, StoryObj } from '@storybook/angular'; |
||||
|
|
||||
import { NoTransactionsInfoComponent } from './no-transactions-info.component'; |
import { GfNoTransactionsInfoComponent } from './no-transactions-info.component'; |
||||
|
|
||||
export default { |
export default { |
||||
title: 'No Transactions Info', |
title: 'No Transactions Info', |
||||
component: NoTransactionsInfoComponent, |
component: GfNoTransactionsInfoComponent, |
||||
decorators: [ |
decorators: [ |
||||
moduleMetadata({ |
moduleMetadata({ |
||||
imports: [GfLogoModule, RouterTestingModule] |
imports: [GfLogoComponent, RouterTestingModule] |
||||
}) |
}) |
||||
] |
] |
||||
} as Meta<NoTransactionsInfoComponent>; |
} as Meta<GfNoTransactionsInfoComponent>; |
||||
|
|
||||
const Template: Story<NoTransactionsInfoComponent> = ( |
type Story = StoryObj<GfNoTransactionsInfoComponent>; |
||||
args: NoTransactionsInfoComponent |
|
||||
) => ({ |
|
||||
props: args |
|
||||
}); |
|
||||
|
|
||||
export const Default = Template.bind({}); |
export const Default: Story = { |
||||
Default.args = {}; |
args: {} |
||||
|
}; |
||||
|
@ -1,38 +1,39 @@ |
|||||
import { CommonModule } from '@angular/common'; |
import { CommonModule } from '@angular/common'; |
||||
import '@angular/localize/init'; |
import '@angular/localize/init'; |
||||
import { Meta, Story, moduleMetadata } from '@storybook/angular'; |
import { moduleMetadata } from '@storybook/angular'; |
||||
|
import type { Meta, StoryObj } from '@storybook/angular'; |
||||
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
||||
|
|
||||
import { PortfolioProportionChartComponent } from './portfolio-proportion-chart.component'; |
import { GfPortfolioProportionChartComponent } from './portfolio-proportion-chart.component'; |
||||
|
|
||||
export default { |
export default { |
||||
title: 'Portfolio Proportion Chart', |
title: 'Portfolio Proportion Chart', |
||||
component: PortfolioProportionChartComponent, |
component: GfPortfolioProportionChartComponent, |
||||
decorators: [ |
decorators: [ |
||||
moduleMetadata({ |
moduleMetadata({ |
||||
declarations: [PortfolioProportionChartComponent], |
imports: [ |
||||
imports: [CommonModule, NgxSkeletonLoaderModule] |
CommonModule, |
||||
|
GfPortfolioProportionChartComponent, |
||||
|
NgxSkeletonLoaderModule |
||||
|
] |
||||
}) |
}) |
||||
] |
] |
||||
} as Meta<PortfolioProportionChartComponent>; |
} as Meta<GfPortfolioProportionChartComponent>; |
||||
|
|
||||
const Template: Story<PortfolioProportionChartComponent> = ( |
type Story = StoryObj<GfPortfolioProportionChartComponent>; |
||||
args: PortfolioProportionChartComponent |
|
||||
) => ({ |
|
||||
props: args |
|
||||
}); |
|
||||
|
|
||||
export const Simple = Template.bind({}); |
export const Simple: Story = { |
||||
Simple.args = { |
args: { |
||||
baseCurrency: 'USD', |
baseCurrency: 'USD', |
||||
keys: ['name'], |
keys: ['name'], |
||||
locale: 'en-US', |
locale: 'en-US', |
||||
positions: { |
positions: { |
||||
Africa: { name: 'Africa', value: 983.22461479889288 }, |
Africa: { name: 'Africa', value: 983.22461479889288 }, |
||||
Asia: { name: 'Asia', value: 12074.754633964973 }, |
Asia: { name: 'Asia', value: 12074.754633964973 }, |
||||
Europe: { name: 'Europe', value: 34432.837085290535 }, |
Europe: { name: 'Europe', value: 34432.837085290535 }, |
||||
'North America': { name: 'North America', value: 26539.89987780503 }, |
'North America': { name: 'North America', value: 26539.89987780503 }, |
||||
Oceania: { name: 'Oceania', value: 1402.220605072031 }, |
Oceania: { name: 'Oceania', value: 1402.220605072031 }, |
||||
'South America': { name: 'South America', value: 4938.25202180719859 } |
'South America': { name: 'South America', value: 4938.25202180719859 } |
||||
|
} |
||||
} |
} |
||||
}; |
}; |
||||
|
@ -1,29 +1,28 @@ |
|||||
import { CommonModule } from '@angular/common'; |
import { CommonModule } from '@angular/common'; |
||||
import { RouterTestingModule } from '@angular/router/testing'; |
import { RouterTestingModule } from '@angular/router/testing'; |
||||
import { Meta, Story, moduleMetadata } from '@storybook/angular'; |
import { moduleMetadata } from '@storybook/angular'; |
||||
|
import type { Meta, StoryObj } from '@storybook/angular'; |
||||
|
|
||||
import { PremiumIndicatorComponent } from './premium-indicator.component'; |
import { GfPremiumIndicatorComponent } from './premium-indicator.component'; |
||||
|
|
||||
export default { |
export default { |
||||
title: 'Premium Indicator', |
title: 'Premium Indicator', |
||||
component: PremiumIndicatorComponent, |
component: GfPremiumIndicatorComponent, |
||||
decorators: [ |
decorators: [ |
||||
moduleMetadata({ |
moduleMetadata({ |
||||
imports: [CommonModule, RouterTestingModule] |
imports: [CommonModule, RouterTestingModule] |
||||
}) |
}) |
||||
] |
] |
||||
} as Meta<PremiumIndicatorComponent>; |
} as Meta<GfPremiumIndicatorComponent>; |
||||
|
|
||||
const Template: Story<PremiumIndicatorComponent> = ( |
type Story = StoryObj<GfPremiumIndicatorComponent>; |
||||
args: PremiumIndicatorComponent |
|
||||
) => ({ |
|
||||
props: args |
|
||||
}); |
|
||||
|
|
||||
export const Default = Template.bind({}); |
export const Default: Story = { |
||||
Default.args = {}; |
args: {} |
||||
|
}; |
||||
|
|
||||
export const WithoutLink = Template.bind({}); |
export const WithoutLink = { |
||||
WithoutLink.args = { |
args: { |
||||
enableLink: false |
enableLink: false |
||||
|
} |
||||
}; |
}; |
||||
|
@ -1,50 +1,53 @@ |
|||||
import { Meta, Story, moduleMetadata } from '@storybook/angular'; |
import { moduleMetadata } from '@storybook/angular'; |
||||
|
import type { Meta, StoryObj } from '@storybook/angular'; |
||||
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
||||
|
|
||||
import { TrendIndicatorComponent } from './trend-indicator.component'; |
import { GfTrendIndicatorComponent } from './trend-indicator.component'; |
||||
|
|
||||
export default { |
export default { |
||||
title: 'Trend Indicator', |
title: 'Trend Indicator', |
||||
component: TrendIndicatorComponent, |
component: GfTrendIndicatorComponent, |
||||
decorators: [ |
decorators: [ |
||||
moduleMetadata({ |
moduleMetadata({ |
||||
imports: [NgxSkeletonLoaderModule] |
imports: [NgxSkeletonLoaderModule] |
||||
}) |
}) |
||||
] |
] |
||||
} as Meta<TrendIndicatorComponent>; |
} as Meta<GfTrendIndicatorComponent>; |
||||
|
|
||||
const Template: Story<TrendIndicatorComponent> = ( |
type Story = StoryObj<GfTrendIndicatorComponent>; |
||||
args: TrendIndicatorComponent |
|
||||
) => ({ |
|
||||
props: args |
|
||||
}); |
|
||||
|
|
||||
export const Loading = Template.bind({}); |
export const Loading: Story = { |
||||
Loading.args = { |
args: { |
||||
isLoading: true |
isLoading: true |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
export const Default = Template.bind({}); |
export const Default: Story = { |
||||
Default.args = {}; |
args: {} |
||||
|
}; |
||||
|
|
||||
export const Delayed = Template.bind({}); |
export const Delayed: Story = { |
||||
Delayed.args = { |
args: { |
||||
marketState: 'delayed', |
dateRange: '1d', |
||||
range: '1d' |
marketState: 'delayed' |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
export const Down = Template.bind({}); |
export const Down: Story = { |
||||
Down.args = { |
args: { |
||||
value: -1 |
value: -1 |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
export const Up = Template.bind({}); |
export const Up: Story = { |
||||
Up.args = { |
args: { |
||||
value: 1 |
value: 1 |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
export const MarketClosed = Template.bind({}); |
export const MarketClosed: Story = { |
||||
MarketClosed.args = { |
args: { |
||||
marketState: 'closed', |
dateRange: '1d', |
||||
range: '1d' |
marketState: 'closed' |
||||
|
} |
||||
}; |
}; |
||||
|
@ -1,71 +1,77 @@ |
|||||
import { Meta, Story, moduleMetadata } from '@storybook/angular'; |
import { moduleMetadata } from '@storybook/angular'; |
||||
|
import type { Meta, StoryObj } from '@storybook/angular'; |
||||
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
||||
|
|
||||
import { ValueComponent } from './value.component'; |
import { GfValueComponent } from './value.component'; |
||||
|
|
||||
export default { |
export default { |
||||
title: 'Value', |
title: 'Value', |
||||
component: ValueComponent, |
component: GfValueComponent, |
||||
decorators: [ |
decorators: [ |
||||
moduleMetadata({ |
moduleMetadata({ |
||||
imports: [NgxSkeletonLoaderModule] |
imports: [NgxSkeletonLoaderModule] |
||||
}) |
}) |
||||
] |
] |
||||
} as Meta<ValueComponent>; |
} as Meta<GfValueComponent>; |
||||
|
|
||||
const Template: Story<ValueComponent> = (args: ValueComponent) => ({ |
type Story = StoryObj<GfValueComponent>; |
||||
props: args |
|
||||
}); |
|
||||
|
|
||||
export const Loading = Template.bind({}); |
export const Loading: Story = { |
||||
Loading.args = { |
args: { |
||||
value: undefined |
value: undefined |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
export const Currency = Template.bind({}); |
export const Currency: Story = { |
||||
Currency.args = { |
args: { |
||||
isCurrency: true, |
isCurrency: true, |
||||
locale: 'en-US', |
locale: 'en-US', |
||||
unit: 'USD', |
unit: 'USD', |
||||
value: 7 |
value: 7 |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
export const Label = Template.bind({}); |
export const Label: Story = { |
||||
Label.args = { |
args: { |
||||
locale: 'en-US', |
locale: 'en-US', |
||||
value: 7.25 |
value: 7.25 |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
export const PerformancePositive = Template.bind({}); |
export const PerformancePositive: Story = { |
||||
PerformancePositive.args = { |
args: { |
||||
locale: 'en-US', |
colorizeSign: true, |
||||
colorizeSign: true, |
isPercent: true, |
||||
isPercent: true, |
locale: 'en-US', |
||||
value: 0.0136810853673890378 |
value: 0.0136810853673890378 |
||||
|
}, |
||||
|
name: 'Performance (positive)' |
||||
}; |
}; |
||||
PerformancePositive.storyName = 'Performance (positive)'; |
|
||||
|
|
||||
export const PerformanceNegative = Template.bind({}); |
export const PerformanceNegative: Story = { |
||||
PerformanceNegative.args = { |
args: { |
||||
locale: 'en-US', |
colorizeSign: true, |
||||
colorizeSign: true, |
isPercent: true, |
||||
isPercent: true, |
locale: 'en-US', |
||||
value: -0.0136810853673890378 |
value: -0.0136810853673890378 |
||||
|
}, |
||||
|
name: 'Performance (negative)' |
||||
}; |
}; |
||||
PerformanceNegative.storyName = 'Performance (negative)'; |
|
||||
|
|
||||
export const PerformanceCloseToZero = Template.bind({}); |
export const PerformanceCloseToZero: Story = { |
||||
PerformanceCloseToZero.args = { |
args: { |
||||
locale: 'en-US', |
colorizeSign: true, |
||||
colorizeSign: true, |
isPercent: true, |
||||
isPercent: true, |
locale: 'en-US', |
||||
value: -2.388915360475e-8 |
value: -2.388915360475e-8 |
||||
|
}, |
||||
|
name: 'Performance (negative zero)' |
||||
}; |
}; |
||||
PerformanceCloseToZero.storyName = 'Performance (negative zero)'; |
|
||||
|
|
||||
export const Precision = Template.bind({}); |
export const Precision: Story = { |
||||
Precision.args = { |
args: { |
||||
locale: 'en-US', |
locale: 'en-US', |
||||
precision: 3, |
precision: 3, |
||||
value: 7.2534802394809285309 |
value: 7.2534802394809285309 |
||||
|
} |
||||
}; |
}; |
||||
|
Loading…
Reference in new issue