From 7557511dd5b4073ca22a473fb08ee53f2798ee72 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 22:19:08 -0500 Subject: [PATCH 1/2] icons --- .../projects/create/TemplateCard.tsx | 24 ++++++-------- .../shared/CustomIcon/CalendarIcon.tsx | 2 +- .../shared/CustomIcon/CheckIcon.tsx | 2 +- .../CustomIcon/CheckRoundFilledIcon.tsx | 2 +- .../CustomIcon/ChevronGrabberHorizontal.tsx | 2 +- .../shared/CustomIcon/ChevronLeft.tsx | 2 +- .../shared/CustomIcon/ChevronRight.tsx | 2 +- .../shared/CustomIcon/CrossIcon.tsx | 2 +- .../shared/CustomIcon/CustomIcon.tsx | 2 +- .../shared/CustomIcon/FolderIcon.tsx | 2 +- .../shared/CustomIcon/GlobeIcon.tsx | 2 +- .../shared/CustomIcon/InfoRoundFilledIcon.tsx | 2 +- .../shared/CustomIcon/InfoSquareIcon.tsx | 2 +- .../shared/CustomIcon/LifeBuoyIcon.tsx | 2 +- .../shared/CustomIcon/LoadingIcon.tsx | 2 +- .../components/shared/CustomIcon/PlusIcon.tsx | 2 +- .../CustomIcon/QuestionMarkRoundIcon.tsx | 2 +- .../shared/CustomIcon/ReactNativeIcon.tsx | 31 +++++++++++++++++++ .../shared/CustomIcon/SearchIcon.tsx | 2 +- .../shared/CustomIcon/SettingsSlidersIcon.tsx | 2 +- .../shared/CustomIcon/WarningIcon.tsx | 2 +- .../src/components/shared/CustomIcon/index.ts | 1 + 22 files changed, 61 insertions(+), 33 deletions(-) create mode 100644 packages/frontend/src/components/shared/CustomIcon/ReactNativeIcon.tsx diff --git a/packages/frontend/src/components/projects/create/TemplateCard.tsx b/packages/frontend/src/components/projects/create/TemplateCard.tsx index 3625b64..a107328 100644 --- a/packages/frontend/src/components/projects/create/TemplateCard.tsx +++ b/packages/frontend/src/components/projects/create/TemplateCard.tsx @@ -1,10 +1,9 @@ import React from 'react'; import toast from 'react-hot-toast'; - -import { IconButton, Typography } from '@material-tailwind/react'; - import { Link } from 'react-router-dom'; +import { ReactNativeIcon, ChevronRight } from 'components/shared/CustomIcon'; + interface TemplateDetails { id: string; name: string; @@ -17,18 +16,15 @@ interface TemplateCardProps { const CardDetails = ({ template }: { template: TemplateDetails }) => { return ( -
- - {template.icon} {template.name} - +
+ +
+ {template.name} +
- - {'>'} - +
+ +
); diff --git a/packages/frontend/src/components/shared/CustomIcon/CalendarIcon.tsx b/packages/frontend/src/components/shared/CustomIcon/CalendarIcon.tsx index 6a51210..e697fb8 100644 --- a/packages/frontend/src/components/shared/CustomIcon/CalendarIcon.tsx +++ b/packages/frontend/src/components/shared/CustomIcon/CalendarIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { CustomIcon, CustomIconProps } from './CustomIcon'; -export const CalendarIcon = (props: CustomIconProps) => { +export const CalendarIcon: React.FC = (props) => { return ( { +export const CheckIcon: React.FC = (props) => { return ( { +export const CheckRoundFilledIcon: React.FC = (props) => { return ( { +export const ChevronGrabberHorizontal: React.FC = (props) => { return ( { +export const ChevronLeft: React.FC = (props) => { return ( { +export const ChevronRight: React.FC = (props) => { return ( { +export const CrossIcon: React.FC = (props) => { return ( { name?: string; } -export const CustomIcon = ({ +export const CustomIcon: React.FC = ({ children, width = 24, height = 24, diff --git a/packages/frontend/src/components/shared/CustomIcon/FolderIcon.tsx b/packages/frontend/src/components/shared/CustomIcon/FolderIcon.tsx index cf82caa..7a7abe8 100644 --- a/packages/frontend/src/components/shared/CustomIcon/FolderIcon.tsx +++ b/packages/frontend/src/components/shared/CustomIcon/FolderIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { CustomIcon, CustomIconProps } from './CustomIcon'; -export const FolderIcon = (props: CustomIconProps) => { +export const FolderIcon: React.FC = (props) => { return ( { +export const GlobeIcon: React.FC = (props) => { return ( { +export const InfoRoundFilledIcon: React.FC = (props) => { return ( { +export const InfoSquareIcon: React.FC = (props) => { return ( { +export const LifeBuoyIcon: React.FC = (props) => { return ( { +export const LoadingIcon: React.FC = (props) => { return ( { +export const PlusIcon: React.FC = (props) => { return ( { +export const QuestionMarkRoundIcon: React.FC = (props) => { return ( = (props) => { + return ( + + + + + + + ); +}; diff --git a/packages/frontend/src/components/shared/CustomIcon/SearchIcon.tsx b/packages/frontend/src/components/shared/CustomIcon/SearchIcon.tsx index 7688adc..30f7dba 100644 --- a/packages/frontend/src/components/shared/CustomIcon/SearchIcon.tsx +++ b/packages/frontend/src/components/shared/CustomIcon/SearchIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { CustomIcon, CustomIconProps } from './CustomIcon'; -export const SearchIcon = (props: CustomIconProps) => { +export const SearchIcon: React.FC = (props) => { return ( { +export const SettingsSlidersIcon: React.FC = (props) => { return ( { +export const WarningIcon: React.FC = (props) => { return ( Date: Mon, 26 Feb 2024 22:30:51 -0500 Subject: [PATCH 2/2] back --- .../projects/create/TemplateCard.tsx | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/frontend/src/components/projects/create/TemplateCard.tsx b/packages/frontend/src/components/projects/create/TemplateCard.tsx index a107328..3625b64 100644 --- a/packages/frontend/src/components/projects/create/TemplateCard.tsx +++ b/packages/frontend/src/components/projects/create/TemplateCard.tsx @@ -1,8 +1,9 @@ import React from 'react'; import toast from 'react-hot-toast'; -import { Link } from 'react-router-dom'; -import { ReactNativeIcon, ChevronRight } from 'components/shared/CustomIcon'; +import { IconButton, Typography } from '@material-tailwind/react'; + +import { Link } from 'react-router-dom'; interface TemplateDetails { id: string; @@ -16,15 +17,18 @@ interface TemplateCardProps { const CardDetails = ({ template }: { template: TemplateDetails }) => { return ( -
- -
- {template.name} -
+
+ + {template.icon} {template.name} +
-
- -
+ + {'>'} +
);