Skip to content

Commit

Permalink
feat: close svg icon 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
miro-ring committed Jan 13, 2024
1 parent 6020a2f commit d5460dc
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ const config: StorybookConfig = {
],
});

const imageRule = config.module?.rules?.find((rule) => {
const test = (rule as { test: RegExp }).test;

if (!test) {
return false;
}

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

imageRule.exclude = /\.svg$/;

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

return config;
},
};
Expand Down
3 changes: 3 additions & 0 deletions src/assets/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/components/Modal/style.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export const dimmed = style([
},
]);

export const closeButton = style({
position: 'absolute',
padding: '12px',
top: 0,
right: 0,
width: '48px',
height: '48px',
});

export const title = style([
sprinkles({
typography: '20/Title/Semibold',
Expand Down
2 changes: 2 additions & 0 deletions src/constants/icon.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Close from '@assets/icons/close.svg';
import Profle from '@assets/icons/profile.svg';
import Submit from '@assets/icons/submit.svg';

export const iconFactory = {
profile: Profle,
submit: Submit,
close: Close,
};

export type Icons = keyof typeof iconFactory;

0 comments on commit d5460dc

Please sign in to comment.