Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Layout 컴포넌트, 스토리북 작성 #10

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/components/common/Layout/Layout.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable no-restricted-exports */
import type { Meta, StoryObj } from '@storybook/react';

import { Layout } from '.';
import { Body1 } from '../Typography';

const meta = {
title: 'components/common/Layout',
component: Layout,
tags: ['autodocs'],
} satisfies Meta<typeof Layout>;

export default meta;
type Story = StoryObj<typeof Layout>;

export const Basic: Story = {
render: () => {
return (
<Layout>
<div className="w-full h-screen bg-gray-50 flex justify-center items-center opacity-40">
<Body1>핀디, 순간을 PIN에 담아보세요!</Body1>
</div>
</Layout>
);
},
};
3 changes: 3 additions & 0 deletions src/components/common/Layout/Layout.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { PropsWithChildren } from 'react';

export type Props = PropsWithChildren;
9 changes: 9 additions & 0 deletions src/components/common/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Props } from './Layout.types';

export const Layout = ({ children }: Props) => {
return (
<div className=" relative max-w-[480px] min-h-screen h-full bg-white py-0 px-4 m-auto">
{children}
</div>
);
};
Loading