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

refactor icon stroke and storybook background #357

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading