Skip to content

Commit

Permalink
Add event icons to Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Apr 15, 2024
1 parent bbb1367 commit af293bb
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/stories/Icons.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import Typography from '@mui/material/Typography'
import { ConsensusTransactionMethod } from '../app/components/ConsensusTransactionMethod'
import { RuntimeTransactionMethod } from '../app/components/RuntimeTransactionMethod'
import { TokenTransferIcon } from '../app/components/Tokens/TokenTransferIcon'
import { ConsensusTxMethod } from '../oasis-nexus/api'
import { EventTypeIcon } from '../app/components/RuntimeEvents/RuntimeEventDetails'
import { ConsensusTxMethod, RuntimeEventType } from '../oasis-nexus/api'
import { COLORS } from '../styles/theme/colors'

export default {
Expand Down Expand Up @@ -88,3 +89,25 @@ export const TokenTransactionIcons: StoryObj = {
render: TokensTemplate,
args: {},
}

const EventsTemplate: StoryFn = () => {
return (
<Box>
{Object.values(RuntimeEventType).map(method => (
<Box
key={method}
gap={4}
sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', paddingBottom: 4 }}
>
<EventTypeIcon eventType={method} eventName="" />
<Typography sx={{ color: COLORS.grayMedium, fontSize: '12px' }}>({method})</Typography>
</Box>
))}
</Box>
)
}

export const EventIcons: StoryObj = {
render: EventsTemplate,
args: {},
}

0 comments on commit af293bb

Please sign in to comment.