Skip to content

Commit

Permalink
Update CheckoutBreadcrumbs (#2716)
Browse files Browse the repository at this point in the history
  • Loading branch information
gustaveen committed Jul 7, 2023
1 parent 42bb9bd commit 8c1afa9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
7 changes: 3 additions & 4 deletions apps/store/src/components/CheckoutHeader/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Root = styled.ul({

const Step = styled.li<{ active: boolean }>(({ active }) => ({
fontSize: theme.fontSizes.xs,
height: theme.space.xl,
height: '2.25rem',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
Expand All @@ -45,12 +45,11 @@ const Step = styled.li<{ active: boolean }>(({ active }) => ({
color: theme.colors.textTertiary,
backgroundColor: theme.colors.opaque1,
borderRadius: theme.radius.xxs,
border: `1px solid ${theme.colors.opaque1}`,
border: `0.5px solid ${theme.colors.borderTranslucent1}`,

...(active && {
backgroundColor: theme.colors.green100,
backgroundColor: theme.colors.signalGreenFill,
color: theme.colors.signalGreenText,
borderColor: theme.colors.green200,
}),
}))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
import { Meta, StoryFn } from '@storybook/react'
import { Breadcrumbs, BreadcrumbsProps, CheckoutStep } from './Breadcrumbs'
import { Meta, StoryObj } from '@storybook/react'
import { GridLayout } from '@/components/GridLayout/GridLayout'
import { Breadcrumbs, CheckoutStep } from './Breadcrumbs'

export default {
const meta: Meta<typeof Breadcrumbs> = {
title: 'Checkout / Header Breadcumbs',
component: Breadcrumbs,
argTypes: {
steps: {
table: { disable: true },
},
},
} as Meta<typeof Breadcrumbs>
}

export default meta
type Story = StoryObj<typeof Breadcrumbs>

const Template: StoryFn<BreadcrumbsProps> = (props) => {
return <Breadcrumbs {...props} />
const Template: Story = {
render: (args) => (
<GridLayout.Root>
<GridLayout.Content width="1/3" align="center">
<Breadcrumbs {...args} />
</GridLayout.Content>
</GridLayout.Root>
),
}

export const Default = Template.bind({})
Default.args = {
steps: [CheckoutStep.Checkout, CheckoutStep.Payment, CheckoutStep.Done],
activeStep: CheckoutStep.Payment,
export const Default = {
...Template,
args: {
steps: [CheckoutStep.Checkout, CheckoutStep.Payment, CheckoutStep.Done],
activeStep: CheckoutStep.Payment,
},
}

2 comments on commit 8c1afa9

@vercel
Copy link

@vercel vercel bot commented on 8c1afa9 Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

onboarding – ./apps/onboarding

onboarding-hedvig.vercel.app
onboarding-git-main-hedvig.vercel.app
racoon-onboarding.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 8c1afa9 Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.