feat: add opacity for categories (#2132)
This commit is contained in:
@@ -3,8 +3,10 @@ import { useDisclosure } from "@mantine/hooks";
|
|||||||
import { IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
import { IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
||||||
|
|
||||||
import type { CategorySection } from "~/app/[locale]/boards/_types";
|
import type { CategorySection } from "~/app/[locale]/boards/_types";
|
||||||
|
import { useRequiredBoard } from "~/app/[locale]/boards/(content)/_context";
|
||||||
import { CategoryMenu } from "./category/category-menu";
|
import { CategoryMenu } from "./category/category-menu";
|
||||||
import { GridStack } from "./gridstack/gridstack";
|
import { GridStack } from "./gridstack/gridstack";
|
||||||
|
import classes from "./item.module.css";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
section: CategorySection;
|
section: CategorySection;
|
||||||
@@ -12,9 +14,10 @@ interface Props {
|
|||||||
|
|
||||||
export const BoardCategorySection = ({ section }: Props) => {
|
export const BoardCategorySection = ({ section }: Props) => {
|
||||||
const [opened, { toggle }] = useDisclosure(false);
|
const [opened, { toggle }] = useDisclosure(false);
|
||||||
|
const board = useRequiredBoard();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card withBorder p={0}>
|
<Card style={{ "--opacity": board.opacity / 100 }} withBorder p={0} className={classes.itemCard}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Group wrap="nowrap" gap="sm">
|
<Group wrap="nowrap" gap="sm">
|
||||||
<UnstyledButton w="100%" p="sm" onClick={toggle}>
|
<UnstyledButton w="100%" p="sm" onClick={toggle}>
|
||||||
|
|||||||
Reference in New Issue
Block a user