mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 22:01:13 +10:00
background colors
This commit is contained in:
@ -22,32 +22,14 @@ interface TableBackgroundColorProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const TABLE_COLORS: TableColorItem[] = [
|
const TABLE_COLORS: TableColorItem[] = [
|
||||||
// First row - grays
|
|
||||||
{ name: "Default", color: "" },
|
{ name: "Default", color: "" },
|
||||||
{ name: "Light blue", color: "#E6E9FF" },
|
{ name: "Blue", color: "#b4d5ff" },
|
||||||
{ name: "Light cyan", color: "#E0F2FE" },
|
{ name: "Green", color: "#acf5d2" },
|
||||||
{ name: "Light teal", color: "#CCFBF1" },
|
{ name: "Yellow", color: "#fef1b4" },
|
||||||
{ name: "Light yellow", color: "#FEF3C7" },
|
{ name: "Red", color: "#ffbead" },
|
||||||
{ name: "Light pink", color: "#FCE7F3" },
|
{ name: "Pink", color: "#ffc7fe" },
|
||||||
{ name: "Light purple", color: "#EDE9FE" },
|
{ name: "Gray", color: "#eaecef" },
|
||||||
|
{ name: "Purple", color: "#c1b7f2" },
|
||||||
// Second row - light colors
|
|
||||||
{ name: "Gray", color: "#F3F4F6" },
|
|
||||||
{ name: "Blue", color: "#BFDBFE" },
|
|
||||||
{ name: "Cyan", color: "#A5F3FC" },
|
|
||||||
{ name: "Teal", color: "#99F6E4" },
|
|
||||||
{ name: "Yellow", color: "#FDE68A" },
|
|
||||||
{ name: "Pink", color: "#FBCFE8" },
|
|
||||||
{ name: "Purple", color: "#DDD6FE" },
|
|
||||||
|
|
||||||
// Third row - bold colors
|
|
||||||
{ name: "Dark gray", color: "#9CA3AF" },
|
|
||||||
{ name: "Bold blue", color: "#60A5FA" },
|
|
||||||
{ name: "Bold cyan", color: "#22D3EE" },
|
|
||||||
{ name: "Bold teal", color: "#2DD4BF" },
|
|
||||||
{ name: "Bold orange", color: "#FB923C" },
|
|
||||||
{ name: "Bold red", color: "#F87171" },
|
|
||||||
{ name: "Bold purple", color: "#A78BFA" },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export const TableBackgroundColor: FC<TableBackgroundColorProps> = ({
|
export const TableBackgroundColor: FC<TableBackgroundColorProps> = ({
|
||||||
@ -83,12 +65,12 @@ export const TableBackgroundColor: FC<TableBackgroundColorProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover
|
<Popover
|
||||||
width={280}
|
width={150}
|
||||||
position="bottom"
|
position="bottom"
|
||||||
opened={opened}
|
opened={opened}
|
||||||
onChange={setOpened}
|
onChange={setOpened}
|
||||||
withArrow
|
withArrow
|
||||||
transitionProps={{ transition: 'pop' }}
|
transitionProps={{ transition: "pop" }}
|
||||||
>
|
>
|
||||||
<Popover.Target>
|
<Popover.Target>
|
||||||
<Tooltip label={t("Background color")} withArrow>
|
<Tooltip label={t("Background color")} withArrow>
|
||||||
@ -112,7 +94,7 @@ export const TableBackgroundColor: FC<TableBackgroundColorProps> = ({
|
|||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: "repeat(7, 1fr)",
|
gridTemplateColumns: "repeat(4, 1fr)",
|
||||||
gap: "8px",
|
gap: "8px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -139,7 +121,8 @@ export const TableBackgroundColor: FC<TableBackgroundColorProps> = ({
|
|||||||
<IconCheck
|
<IconCheck
|
||||||
size={18}
|
size={18}
|
||||||
style={{
|
style={{
|
||||||
color: item.color === "" || item.color.startsWith("#F")
|
color:
|
||||||
|
item.color === "" || item.color.startsWith("#F")
|
||||||
? "#000000"
|
? "#000000"
|
||||||
: "#ffffff",
|
: "#ffffff",
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user