Skip to content

Commit

Permalink
feat: 뒤로가기 액션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieonn committed Nov 18, 2024
1 parent 520eda8 commit 6d825b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/stories/components/AppBar/AppBar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ const meta: Meta<typeof AppBar> = {
export default meta;
type Story = StoryObj<typeof meta>;

function handleBackClick() {
if (window.history.length > 1) {
window.history.back(); // 이전 페이지로 이동
}
}


export const Default: Story = {
args: {},
};

export const Back: Story = {
args: {
prefix: <AppBarBack height="20px" cursor="pointer" />,
prefix: <AppBarBack height="20px" cursor="pointer" onClick={handleBackClick}/>,
},
};

Expand Down

0 comments on commit 6d825b3

Please sign in to comment.