Skip to content

Commit

Permalink
Add defi story
Browse files Browse the repository at this point in the history
  • Loading branch information
nickick committed Aug 21, 2023
1 parent b9afb73 commit 8a5967b
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
11 changes: 11 additions & 0 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ export const Button = ({
hoverStyles = type === 'header' ? '' : 'hover:text-gray-300'
break

case 'defi':
background =
type === 'primary'
? 'bg-gradient-to-r from-oeth-button-start to-oeth-button-end'
: type === 'secondary'
? 'bg-gradient-to-r from-oeth-button-dark-start to-oethx -button-dark-end'
: ''
textColor = 'text-white'
hoverStyles = type === 'header' ? '' : 'hover:text-gray-300'
break

case 'story':
background =
type === 'primary'
Expand Down
55 changes: 52 additions & 3 deletions src/components/Header/Header.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentStory, ComponentMeta } from '@storybook/react'
import { ComponentStory, ComponentMeta, Meta, StoryFn } from '@storybook/react'

import { Header } from '.'

Expand All @@ -9,9 +9,9 @@ export default {
// More on Story layout: https://storybook.js.org/docs/react/configure/story-layout
layout: 'fullscreen'
}
} as ComponentMeta<typeof Header>
} as Meta<typeof Header>

const Template: ComponentStory<typeof Header> = (args) => <Header {...args} />
const Template: StoryFn<typeof Header> = (args) => <Header {...args} />

export const OriginProtocol = Template.bind({})
OriginProtocol.args = {
Expand Down Expand Up @@ -153,6 +153,55 @@ OETH.parameters = {
}
}

export const Defi = Template.bind({})
Defi.args = {
webProperty: 'defi',
mappedLinks: [
{
href: 'https://ousd.com',
label: 'Governance',
isButton: false,
order: 1,
links: []
},
{
href: 'https://ousd.com',
label: 'Docs',
isButton: false,
order: 3,
links: []
},
{
href: 'https://ousd.com',
label: 'FAQ',
isButton: false,
order: 3,
links: []
},
{
href: 'https://ousd.com',
label: 'OGV',
isButton: false,
order: 5,
links: []
},
{
href: 'https://google.com',
label: 'App',
isButton: true,
order: 6,
links: []
}
],
background: 'bg-black md:bg-black'
}

Defi.parameters = {
backgrounds: {
default: 'dark'
}
}

export const Story = Template.bind({})
Story.args = {
webProperty: 'story',
Expand Down

0 comments on commit 8a5967b

Please sign in to comment.