Skip to content

Commit

Permalink
feat(ui): storybook 에서 임포트한 컴포넌트가 바로 tailwindCss 적용되도록 함
Browse files Browse the repository at this point in the history
  • Loading branch information
lsj0202 committed Aug 10, 2024
1 parent ab17811 commit e29bae1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion apps/client/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Metadata } from 'next';
import '..//styles/globals.css';
import '../styles/globals.css';

export const metadata: Metadata = {
title: 'Create Next App',
Expand Down
12 changes: 2 additions & 10 deletions apps/client/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
import { WarningAlertModal } from '@jjoing/ui';

export default function Home() {
return (
<WarningAlertModal
title="정말 프로젝트를 삭제하실 건가요?"
subTitle="한 번 삭제한 프로젝트는 복구 할 수 없어요."
confirmTitle="삭제"
/>
);
export default function HomePage() {
return <></>;
}
3 changes: 1 addition & 2 deletions packages/ui/src/WarningAlertModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ForwardedRef, forwardRef } from 'react';
import '../styles.css';

type WarningAlertModalProps = {
title: string;
Expand All @@ -21,7 +20,7 @@ const WarningAlertModal = forwardRef(function WarningAlertModal(
ref: ForwardedRef<HTMLDivElement>
) {
return (
<div ref={ref} {...props} className="w-80 h-52 bg-white flex flex-col rounded-lg">
<div ref={ref} className="w-80 h-52 bg-white flex flex-col rounded-lg" {...props}>
<div className="w-full h-[220px] flex flex-col items-center justify-center gap-4">
<h2 className="text-black text-lg font-semibold">{title}</h2>
<h4 className="text-black">{subTitle}</h4>
Expand Down
1 change: 1 addition & 0 deletions storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Preview } from '@storybook/react';
import './styles.css';

const preview: Preview = {
parameters: {
Expand Down
3 changes: 3 additions & 0 deletions storybook/.storybook/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

0 comments on commit e29bae1

Please sign in to comment.