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

fix: Add IconV2 with new svg settings and revert old Icons changed by PR #384 #387

Merged
merged 6 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.