Skip to content

Commit

Permalink
♻️ refactor icon stroke and storybook background
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnsonMao committed Nov 19, 2023
1 parent 8bde0eb commit 472476d
Show file tree
Hide file tree
Showing 52 changed files with 87 additions and 82 deletions.
4 changes: 2 additions & 2 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ const config: StorybookConfig = {
const fileLoaderRules = config.module?.rules?.filter(
(rule) =>
rule !== "..." &&
rule.test &&
rule &&
rule.test instanceof RegExp &&
rule.test.test(".svg")
);

fileLoaderRules?.forEach((rule) => {
if (rule !== "...") rule.exclude = /\.svg$/;
if (rule && rule !== "...") rule.exclude = /\.svg$/;
});

config.module?.rules?.push({
Expand Down
7 changes: 6 additions & 1 deletion .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ const preview: Preview = {
parameters: {
backgrounds: {
default: "Dark",
values: [{ name: "Dark", value: "#1E1F22" }],
values: [
{
name: "Dark",
value: "linear-gradient(145.51deg, #06020B -7.4%, #2C1B47 154.79%)",
},
],
},
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
Expand Down
2 changes: 1 addition & 1 deletion components/shared/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type IconProps = {
*/
const Icon = (props: IconProps) => {
const { className, name, ...rest } = props;
const transformClassName = cn(className);
const transformClassName = cn("stroke-primary-100", className);
const SvgIcon = name && icons[name];

return (
Expand Down
10 changes: 5 additions & 5 deletions components/shared/Icon/icons/svgs/arcade.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/archery-match.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/archery.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/arrow-left-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/arrow-right-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/bounce-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/bright-crown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/bright-star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions components/shared/Icon/icons/svgs/cellar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/chat-lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/chess-rook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions components/shared/Icon/icons/svgs/collectbook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 472476d

Please sign in to comment.