Skip to content

Commit

Permalink
Change the delete IconText color to red and completion the error color (
Browse files Browse the repository at this point in the history
  • Loading branch information
imyuanx authored Jul 13, 2023
1 parent ab855b1 commit 28a3c78
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 12 deletions.
2 changes: 2 additions & 0 deletions web/src/chakraTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ const theme = extendTheme({
},
error: {
100: "#FDECEE",
200: "#FDD8DC",
400: "#FF8492",
500: "#F16979",
600: "#ED4458",
},
Expand Down
9 changes: 9 additions & 0 deletions web/src/chakraThemeDark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ const Button = defineStyleConfig({
},
},

warn: {
bg: "lafDark.300",
_hover: {
bg: "error.500",
},
},

warnText: {
color: "error.500",
_hover: {
Expand Down Expand Up @@ -412,6 +419,8 @@ const theme = extendTheme({
},
error: {
100: "#FDECEE",
200: "#FDD8DC",
400: "#FF8492",
500: "#F16979",
600: "#ED4458",
},
Expand Down
13 changes: 9 additions & 4 deletions web/src/components/IconText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { COLOR_MODE } from "@/constants";
export default function IconText(props: {
icon: React.ReactElement;
text: string;
className?: string;
onClick?: () => void;
}) {
const { colorMode } = useColorMode();
Expand All @@ -15,10 +16,14 @@ export default function IconText(props: {
return (
<div
onClick={props.onClick}
className={clsx("flex flex-col items-center text-grayIron-600", {
"hover:text-black": !darkMode,
"hover:text-white": darkMode,
})}
className={clsx(
"flex flex-col items-center text-grayIron-600",
{
"hover:text-black": !darkMode,
"hover:text-white": darkMode,
},
props.className,
)}
>
{React.cloneElement(props.icon, {
height: "20px",
Expand Down
6 changes: 5 additions & 1 deletion web/src/pages/app/database/PolicyListPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ export default function PolicyListPanel() {
headerText={String(t("Delete"))}
bodyText={t("CollectionPanel.ConformDelete")}
>
<IconText icon={<DeleteIcon />} text={t("Delete")} />
<IconText
icon={<DeleteIcon />}
text={t("Delete")}
className="hover:!text-error-600"
/>
</ConfirmButton>
</>
</MoreButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function DeleteCollectionModal(props: { database: any }) {
}}
icon={<DeleteIcon />}
text={t("Delete")}
className="hover:!text-error-600"
/>

<Modal isOpen={isOpen} onClose={onClose}>
Expand Down
6 changes: 5 additions & 1 deletion web/src/pages/app/functions/mods/FunctionPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ export default function FunctionList() {
headerText={String(t("Delete"))}
bodyText={String(t("FunctionPanel.DeleteConfirm"))}
>
<IconText icon={<DeleteIcon />} text={t("Delete")} />
<IconText
icon={<DeleteIcon />}
text={t("Delete")}
className="hover:!text-error-600"
/>
</ConfirmButton>
</>
</MoreButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function DeleteBucketModal(props: { storage: TBucket; onSuccessAction?: () => vo
<IconText
icon={<DeleteIcon />}
text={t("Delete")}
className="hover:!text-error-600"
onClick={() => {
reset();
onOpen();
Expand Down
13 changes: 7 additions & 6 deletions web/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ module.exports = {
md: "768px",
lg: "976px",
xl: "1440px",
'2xl': "1680px",
'phone': { 'min': '320px', 'max': '480px' },
'laptop': { 'min': '1024px', 'max': '1440px' },
'pc': { 'min': '1441px' },
"2xl": "1680px",
phone: { min: "320px", max: "480px" },
laptop: { min: "1024px", max: "1440px" },
pc: { min: "1441px" },
},
boxShadow: {
DEFAULT: "0px 4px 10px rgba(191, 202, 213, 0.25)",
Expand Down Expand Up @@ -95,6 +95,7 @@ module.exports = {
},
error: {
100: "#FDECEE",
200: "#FDD8DC",
400: "#FF8492",
500: "#F16979",
600: "#ED4458",
Expand All @@ -117,7 +118,7 @@ module.exports = {
},
adora: {
200: "#E6E3F7",
600: "#8172D8"
600: "#8172D8",
},
blue: {
100: "#EBF7FD",
Expand All @@ -128,7 +129,7 @@ module.exports = {
},
frostyNightfall: {
200: "#EAEBF0",
300: "#D5D6E1"
300: "#D5D6E1",
},
},
},
Expand Down

0 comments on commit 28a3c78

Please sign in to comment.