feat: common assets 패키지 적용

This commit is contained in:
2025-02-25 16:51:44 +09:00
parent 6d0d2654de
commit c721860812
10 changed files with 116 additions and 23 deletions
-2
View File
@@ -1,2 +0,0 @@
node_modules
dist
+10
View File
@@ -0,0 +1,10 @@
declare const images: {
readonly logo: any;
readonly menuBtn: any;
};
type ImageType = keyof typeof images;
declare const fonts: {};
type FontType = keyof typeof fonts;
export { type FontType, type ImageType, fonts, images };
+10
View File
@@ -0,0 +1,10 @@
declare const images: {
readonly logo: any;
readonly menuBtn: any;
};
type ImageType = keyof typeof images;
declare const fonts: {};
type FontType = keyof typeof fonts;
export { type FontType, type ImageType, fonts, images };
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -4
View File
@@ -13,10 +13,7 @@
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./images": "./src/images",
"./icons": "./src/icons",
"./fonts": "./src/fonts"
}
},
"scripts": {
"build": "tsup",
@@ -1,5 +0,0 @@
export const icons = {
// 예시: close: require('./close.svg'),
} as const;
export type IconType = keyof typeof icons;
-1
View File
@@ -1,3 +1,2 @@
export * from "./images";
export * from "./icons";
export * from "./fonts";
+1 -4
View File
@@ -3,9 +3,6 @@
"exclude": ["dist", "build", "node_modules"],
"compilerOptions": {
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"@common/assets/*": ["./src/*"]
}
"baseUrl": "."
}
}
@@ -1,4 +1,3 @@
import { BASE_ASSETS_PATH } from "../../env";
import {
DropdownMenu,
DropdownMenuTrigger,
@@ -6,20 +5,17 @@ import {
DropdownMenuItem,
} from "../dropdown-menu";
import { Button } from "../button";
import { images } from "@common/assets";
export function Header() {
return (
<header className="sticky top-0 box-border flex h-[5rem] w-full items-center justify-between border-b border-solid border-border">
<div className="flex items-center">
<div className="MobMenuBtn">
<img src={`${BASE_ASSETS_PATH}/images/mob_menuBtn.svg`} />
<img src={images.menuBtn} />
</div>
<h1 className="flex items-center gap-4">
<img
src={`${BASE_ASSETS_PATH}/images/logo.png`}
className="h-[3rem]"
alt="logo"
/>
<img src={images.logo} className="h-[3rem]" alt="logo" />
<span className="text-[1.8rem] font-semibold">통합플랫폼관리</span>
</h1>
</div>