Skip to content

Commit

Permalink
Add padding to Stepper component and update Storybook metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
hervedombya committed Nov 9, 2023
1 parent 39655b0 commit 88555bf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/steppers/Stepper.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const Stepper = <T extends any[]>({

return (
<StepperContext.Provider value={{ next, prev }}>
<Box display={'flex'} gap={32}>
<Box display={'flex'} gap={32} padding={32}>
<Steppers
activeStep={currentStep}
steps={steps.map((step) => {
Expand Down
24 changes: 16 additions & 8 deletions stories/stepper.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import { Stack } from '../src/lib/spacing';
import { Button } from '../src/lib/components/buttonv2/Buttonv2.component';
import { Text } from '../src/lib/components/text/Text.component';
import { Wrapper as StoryWrapper } from './common';

export default {
title: 'Components/Progress & loading/Steppers',
component: Stepper,
decorators: [(story) => <StoryWrapper>{story()}</StoryWrapper>],
};
import type { Meta, StoryObj } from '@storybook/react';

const Wrapper = styled.div`
display: flex;
Expand Down Expand Up @@ -111,6 +106,19 @@ enum StepIndexes {
Step3,
}

export const SimpleStepper = ({}) => {
return <Stepper steps={STEPS} />;
const meta: Meta<typeof Stepper> = {
tags: ['autodocs'],
title: 'Components/Stepper',
component: Stepper,
};
export default meta;

type Story = StoryObj<typeof Stepper>;
export const SimpleStepper: Story = {
name: 'Simple Stepper',
render: () => (
<StoryWrapper>
<Stepper steps={STEPS} />
</StoryWrapper>
),
};

0 comments on commit 88555bf

Please sign in to comment.