feat: export years to reuse

This commit is contained in:
RadoslavDimchev 2023-09-15 20:48:36 +03:00
parent d84b24ea50
commit fd767e1d45
3 changed files with 36 additions and 17 deletions

View File

@ -15,3 +15,20 @@ export const BAD_NETWORK_TEXT = 'Network Latency is high.'
export const KEYSTORE_FILES = 'KeystoreFiles' export const KEYSTORE_FILES = 'KeystoreFiles'
export const RECOVERY_PHRASE = 'Recovery Phrase' export const RECOVERY_PHRASE = 'Recovery Phrase'
export const BOTH_KEY_AND_RECOVERY = 'Both KeystoreFiles & Recovery Phrase' export const BOTH_KEY_AND_RECOVERY = 'Both KeystoreFiles & Recovery Phrase'
/* Dashboard */
export const years = [
'JAN',
'FEB',
'MAR',
'APR',
'MAY',
'JUN',
'JUL',
'AUG',
'SEPT',
'OCT',
'NOV',
'DEC',
]

View File

@ -7,9 +7,9 @@ import { DateRange } from 'react-day-picker'
import DashboardCardWrapper from '../DashboardCardWrapper' import DashboardCardWrapper from '../DashboardCardWrapper'
import LineChart from './LineChart' import LineChart from './LineChart'
import Icon from '../../../components/General/Icon' import Icon from '../../../components/General/Icon'
import { years } from '../../../constants'
import './calendar.css' import './calendar.css'
const years = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEPT', 'OCT', 'NOV', 'DEC']
const userGains = [ const userGains = [
10000, 15000, 17500, 20000, 19000, 23222, 25000, 20000, 20000, 21000, 22300, 21000, 10000, 15000, 17500, 20000, 19000, 23222, 25000, 20000, 20000, 21000, 22300, 21000,
] ]

View File

@ -1,29 +1,31 @@
import type { Meta, StoryObj } from '@storybook/react' import type { Meta, StoryObj } from '@storybook/react'
import LineChart from './LineChart' import LineChart from './LineChart'
import { Stack } from 'tamagui' import { Stack } from 'tamagui'
import { years } from '../../../constants'
const years = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEPT', 'OCT', 'NOV', 'DEC'] const userGains = [
const userGains = [10000, 15000, 17500, 20000, 19000, 23222, 25000, 20000, 20000, 21000, 22300, 21000] 10000, 15000, 17500, 20000, 19000, 23222, 25000, 20000, 20000, 21000, 22300, 21000,
]
const meta = { const meta = {
title: 'Dashboard/LineChart', title: 'Dashboard/LineChart',
component: LineChart, component: LineChart,
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'], tags: ['autodocs'],
decorators: [StoryObj => decorators: [
( StoryObj => (
<Stack width={'536px'}> <Stack width={'536px'}>
<StoryObj />, <StoryObj />,
</Stack> </Stack>
) ),
] ],
} satisfies Meta<typeof LineChart> } satisfies Meta<typeof LineChart>
export default meta export default meta
type Story = StoryObj<typeof meta> type Story = StoryObj<typeof meta>
export const Page: Story = { export const Page: Story = {
args: { userGains, years }, args: { userGains, years },
} }