Skip to content

Commit

Permalink
Merge pull request #387 from Game-as-a-Service/hotfix/some-icon-disap…
Browse files Browse the repository at this point in the history
…peared

fix: Add IconV2 with new svg settings and revert old Icons changed by PR #384
  • Loading branch information
JohnsonMao authored Jun 1, 2024
2 parents 562077c + f430ce7 commit a0d4305
Show file tree
Hide file tree
Showing 112 changed files with 430 additions and 127 deletions.
9 changes: 5 additions & 4 deletions components/shared/Button/v2/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import React, {
} from "react";
import { cn } from "@/lib/utils";
import BoxFancy, { BoxFancyBorderGradientVariant } from "../../BoxFancy";
import { IconName } from "@/components/shared/Icon/icons";
import Icon from "@/components/shared/Icon";
import { IconNameV2 } from "@/components/shared/Icon/v2/icons";
import IconV2 from "@/components/shared/Icon/v2";
import { PolymorphicComponentProp, PolymorphicRef } from "@/lib/types";

export enum ButtonType {
Expand Down Expand Up @@ -40,7 +40,7 @@ interface BaseButtonProps {
variant?: ButtonType;
size?: ButtonSize;
icon?: ReactNode;
iconName?: IconName;
iconName?: IconNameV2;
disabled?: boolean;
// inner div className for styling
boxFancyClassName?: string;
Expand Down Expand Up @@ -128,7 +128,8 @@ const InteralButton: InnerButtonComponent = (
borderGradientColor={borderGradientColor}
className={buttonClassName}
>
{icon || (iconName && <Icon name={iconName} className={iconClasses} />)}
{icon ||
(iconName && <IconV2 name={iconName} className={iconClasses} />)}
<span>{children}</span>
</BoxFancy>
</Component>
Expand Down
43 changes: 0 additions & 43 deletions components/shared/Icon/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,6 @@ import star from "./svgs/star.svg";
import tower from "./svgs/tower.svg";
import trophy from "./svgs/trophy.svg";
import tunnel from "./svgs/tunnel.svg";

import calendar from "./svgs/calendar.svg";
import chatDefault from "./svgs/chat-default.svg";
import chatUpdates from "./svgs/chat-updates.svg";
import clock from "./svgs/clock.svg";
import editMode from "./svgs/edit-mode.svg";
import frame from "./svgs/frame.svg";
import helpCircle from "./svgs/help-circle.svg";
import house from "./svgs/house.svg";
import houseLock from "./svgs/house-lock.svg";
import leadingIcon from "./svgs/leading-icon.svg";
import logOut from "./svgs/log-out.svg";
import longArrowUpLeft from "./svgs/long-arrow-up-left.svg";
import nonpublic from "./svgs/nonpublic.svg";
import notificationDefault from "./svgs/notification-default.svg";
import notificationUpdates from "./svgs/notification-updates.svg";
import preview from "./svgs/preview.svg";
import refresh from "./svgs/refresh.svg";
import sharing from "./svgs/sharing.svg";
import sort from "./svgs/sort.svg";
import x from "./svgs/x.svg";

const icons = {
logo,
check,
Expand Down Expand Up @@ -145,27 +123,6 @@ const icons = {
tower,
trophy,
tunnel,

calendar,
chatDefault,
chatUpdates,
clock,
editMode,
frame,
helpCircle,
house,
houseLock,
leadingIcon,
logOut,
longArrowUpLeft,
nonpublic,
notificationDefault,
notificationUpdates,
preview,
refresh,
sharing,
sort,
x,
};

export type IconName = keyof typeof icons;
Expand Down
2 changes: 1 addition & 1 deletion 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.
2 changes: 1 addition & 1 deletion 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/check.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.
2 changes: 1 addition & 1 deletion 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.
2 changes: 1 addition & 1 deletion components/shared/Icon/icons/svgs/community.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/crown.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: 1 addition & 3 deletions components/shared/Icon/icons/svgs/discord.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/droplet.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/edit-pencil.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/edit.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 a0d4305

Please sign in to comment.