update ColorCard.js and default.js

master
mahdi 3 years ago
parent e94d7e43b6
commit 3449a8c840
  1. 10
      src/components/ThemeColor/ColorCard.js
  2. 2
      src/components/ThemeColor/default.js

@ -13,15 +13,16 @@ const ColorCard = ({
return ( return (
<div className="flex flex-col gap-y-3"> <div className="flex flex-col gap-y-3">
<div <div
className={`w-[344px] h-[130px] flex flex-col border-2 cursor-pointer rounded-sm relative p-4 bg-${item} ${ className={`w-[344px] h-[130px] flex flex-col cursor-pointer rounded-sm relative p-4 bg-${item} ${
text ? `text-${item}Text` : "" text ? `text-${item}Text` : ""
} ${borderColor ? `border-${item}Border` : ""} `} } ${borderColor ? ` border border-${item}Border` : ""} `}
onClick={() => setItem(item)} onClick={() => setItem(item)}
> >
<ItemColor className=" text-2xl font-bold" item={item} theme={theme} /> <ItemColor className=" text-2xl font-bold" item={item} theme={theme} />
<div className="flex flex-row items-center justify-between mt-5 ">
{text && ( {text && (
<ItemColor <ItemColor
className="self-end text-sm" className="text-sm"
item={item + "Text"} item={item + "Text"}
theme={theme} theme={theme}
onClick={(e) => { onClick={(e) => {
@ -32,7 +33,7 @@ const ColorCard = ({
)} )}
{borderColor && ( {borderColor && (
<ItemColor <ItemColor
className="self-start text-sm" className="text-sm"
item={item + "Border"} item={item + "Border"}
theme={theme} theme={theme}
onClick={(e) => { onClick={(e) => {
@ -42,6 +43,7 @@ const ColorCard = ({
/> />
)} )}
</div> </div>
</div>
<div className="flex flex-row justify-between"> <div className="flex flex-row justify-between">
{" "} {" "}
{dark ? ( {dark ? (

@ -11,7 +11,7 @@ const defaultTheme = {
backgroundText: "#000000", backgroundText: "#000000",
surface: "#6eb1d2", surface: "#6eb1d2",
surfaceText: "#000000", surfaceText: "#000000",
surfaceBorder: "#166a95", surfaceBorder: "#FF08AD",
}; };
const classNames = const classNames =
"bg-primary text-primaryText bg-secondary text-secondaryText bg-primaryDark bg-primaryLight text-primaryDark text-primaryLight bg-primaryDark bg-secondaryLight text-secondaryDark text-secondaryLight bg-secondaryDark text-secondaryDark bg-background text-backgroundText bg-surface text-surfaceText border-surfaceBorder"; "bg-primary text-primaryText bg-secondary text-secondaryText bg-primaryDark bg-primaryLight text-primaryDark text-primaryLight bg-primaryDark bg-secondaryLight text-secondaryDark text-secondaryLight bg-secondaryDark text-secondaryDark bg-background text-backgroundText bg-surface text-surfaceText border-surfaceBorder";

Loading…
Cancel
Save