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

๐ŸŽจ ๊ณต์šฉ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ (๋“œ๋กญ๋‹ค์šด, ํ—ค๋”, ํŽ˜์ด์ง€ ์ปจํ…Œ์ด๋„ˆ) #9

Merged
merged 22 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2559cfc
feat: svgr ์„ค์น˜ ๋ฐ ์„ธํŒ…
suhwan2004 Oct 20, 2024
6b67300
feat: shared ํด๋” ๋‚ด์—์„œ tailwind๊ฐ€ ์ž‘๋™๋˜๋„๋ก ์„ธํŒ…
suhwan2004 Oct 20, 2024
75712f4
feat: public ํด๋”๋‚ด assets์„ import ๊ฐ€๋Šฅํ•˜๋„๋ก ์„ธํŒ…
suhwan2004 Oct 20, 2024
96e12c5
feat: storybook์—์„œ svgr์ด ๋™์ž‘๋˜๋„๋ก ์„ธํŒ…
suhwan2004 Oct 20, 2024
cd146d9
feat: header ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„
suhwan2004 Oct 20, 2024
2c96233
feat: PageContainer ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„
suhwan2004 Oct 20, 2024
9279cf0
feat: Dropdown ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„ ๋ฐ storise ํŒŒ์ผ ์ƒ์„ฑ
suhwan2004 Oct 20, 2024
4523ebc
feat: page.tsx์— pagecontainer ์ ์šฉ
suhwan2004 Oct 20, 2024
0d133c3
feat: dropdown, header export ํŒŒ์ผ ์ถ”๊ฐ€
suhwan2004 Oct 20, 2024
5e3b0e8
chore: lint ์ ์šฉ
suhwan2004 Oct 20, 2024
eead774
chore: shared ๋‚ด .gitkeep ์ œ๊ฑฐ
suhwan2004 Oct 20, 2024
d8b442c
feat: dropdown ๋‚ด use-client ์ถ”๊ฐ€
suhwan2004 Oct 20, 2024
e37d0e0
feat: PageContainer export ๊ตฌ์กฐ ์ˆ˜์ •
suhwan2004 Oct 20, 2024
688038e
Merge branch 'main' into feat/common-component-sh
suhwan2004 Oct 21, 2024
eaf48b7
setting: next.config.mjs๋‚ด turbopack ๋Œ€์‘ svg ์„ค์ • ์ œ๊ฑฐ
suhwan2004 Oct 21, 2024
5dc9820
feat: pageContainer ๋‚ด import ์ˆ˜์ •
suhwan2004 Oct 21, 2024
4b9f254
feat: dropdown ์ปดํฌ๋„ŒํŠธ ์ˆ˜์ •
suhwan2004 Oct 21, 2024
0c27f0d
Merge branch 'feat/common-component-sh' of https://github.com/CollaBuโ€ฆ
suhwan2004 Oct 21, 2024
34f27f9
chore: dropdown stories ํŒŒ์ผ ๋‚ด ๋„ค์ด๋ฐ ์ˆ˜์ •
suhwan2004 Oct 21, 2024
e34b33e
style: dropdown ์ปดํฌ๋„ŒํŠธ button ๋‚ด radius ์ถ”๊ฐ€
suhwan2004 Oct 21, 2024
c1f3b63
feat: Dropdown.stories.tsx ํƒ€์ž… ๋ช…์‹œ ์ค„์ž„ ๋ฐ props ๋‚ด ํ•จ์ˆ˜ ์„ ์–ธํ•˜์—ฌ ์ ์šฉ
suhwan2004 Oct 22, 2024
eb8e908
feat: Header.tsx ๋‚ด prop type ์ˆ˜์ •
suhwan2004 Oct 22, 2024
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
23 changes: 23 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,28 @@ const config: StorybookConfig = {
name: '@storybook/nextjs',
options: {},
},
webpackFinal: async (config) => {
const imageRule = config.module?.rules?.find((rule) => {
const test = (rule as { test: RegExp }).test;

if (!test) {
return false;
}
if (Array.isArray(test)) {
return test.some((t) => t instanceof RegExp && t.test('.svg'));
}

return test instanceof RegExp && test.test('.svg');
}) as { [key: string]: any };

imageRule.exclude = /\.svg$/;

config.module?.rules?.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});

return config;
},
};
export default config;
67 changes: 39 additions & 28 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,50 @@
import IconArrowFront from '/public/assets/icon/arrow-front.svg';

import { PageContainer } from '@/widgets/pageContainer/ui/PageContainer';
export default function Home() {
return (
<div className="flex flex-row justify-center gap-12 bg-[#666666]">
<div className="w-72">
<p className="bg-white text-black">White</p>
<p className="bg-gray01 text-black">Gray 01</p>
<p className="bg-gray02 text-black">Gray 02</p>
<p className="bg-gray03 text-black">Gray 03</p>
<p className="bg-gray04 text-black">Gray 04</p>
<p className="bg-gray05 text-black">Gray 05</p>
<p className="bg-gray06 text-black">Gray 06</p>
<p className="bg-gray07 text-white">Gray 07</p>
</div>
<PageContainer
headerProps={{
left: <IconArrowFront width="44" height="44" />,
center: <div className="text-black">๋ฉ”์ธํŽ˜์ด์ง€</div>,
right: <button className="w-[44px] h-[44px] pr-2 text-black">๊ฒŒ์‹œ</button>,
}}
>
<div className="mt-[44px] flex flex-col justify-center gap-12 bg-[#666666]">
<div className="w-72">
<p className="bg-white text-black">White</p>
<p className="bg-gray01 text-black">Gray 01</p>
<p className="bg-gray02 text-black">Gray 02</p>
<p className="bg-gray03 text-black">Gray 03</p>
<p className="bg-gray04 text-black">Gray 04</p>
<p className="bg-gray05 text-black">Gray 05</p>
<p className="bg-gray06 text-black">Gray 06</p>
<p className="bg-gray07 text-white">Gray 07</p>
</div>

<div className="w-72">
<p className="bg-red01 text-black">Red 01</p>
<p className="bg-red02 text-black">Red 02</p>
<p className="bg-red03 text-black">Red 03</p>
<div className="w-72">
<p className="bg-red01 text-black">Red 01</p>
<p className="bg-red02 text-black">Red 02</p>
<p className="bg-red03 text-black">Red 03</p>

<div className="h-6" />
<div className="h-6" />

<p className="bg-yellow01 text-black">Yellow 01</p>
<p className="bg-yellow02 text-black">Yellow 02</p>
</div>
<p className="bg-yellow01 text-black">Yellow 01</p>
<p className="bg-yellow02 text-black">Yellow 02</p>
</div>

<div className="w-72">
<p className="bg-ashblue01 text-black">Ashblue 01</p>
<p className="bg-ashblue02 text-black">Ashblue 02</p>
<p className="bg-overlay text-white">Overlay</p>
<div className="w-72">
<p className="bg-ashblue01 text-black">Ashblue 01</p>
<p className="bg-ashblue02 text-black">Ashblue 02</p>
<p className="bg-overlay text-white">Overlay</p>

<div className="h-6" />
<div className="h-6" />

<p className="bg-mint01 text-black">Mint 01</p>
<p className="bg-mint02 text-black">Mint 02</p>
<p className="bg-mint03 text-black">Mint 03</p>
<p className="bg-mint01 text-black">Mint 01</p>
<p className="bg-mint02 text-black">Mint 02</p>
<p className="bg-mint03 text-black">Mint 03</p>
</div>
</div>
</div>
</PageContainer>
);
}
4 changes: 4 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.svg' {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
export default content;
}
20 changes: 19 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"],
});
return config;
},
experimental: {
turbo: {
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
as: "*.js",
},
},
},
BangDori marked this conversation as resolved.
Show resolved Hide resolved
},
};

export default nextConfig;
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
},
"devDependencies": {
"@chromatic-com/storybook": "^1.9.0",
"@eslint/js": "^9.12.0",
"@tanstack/eslint-plugin-query": "^5.59.7",
"@tanstack/react-query-devtools": "^5.59.4",
"@eslint/js": "^9.12.0",
"@storybook/addon-a11y": "^8.3.5",
"@storybook/addon-designs": "^8.0.3",
"@storybook/addon-essentials": "^8.3.5",
Expand All @@ -38,6 +36,9 @@
"@storybook/nextjs": "^8.3.5",
"@storybook/react": "^8.3.5",
"@storybook/test": "^8.3.5",
"@svgr/webpack": "^8.1.0",
"@tanstack/eslint-plugin-query": "^5.59.7",
"@tanstack/react-query-devtools": "^5.59.4",
"@testing-library/react": "^16.0.1",
"@types/node": "^20",
"@types/react": "^18",
Expand Down
Loading