From cc3a2c1f7576a63749064020208b67f1ead54ca9 Mon Sep 17 00:00:00 2001 From: Delusoire Date: Tue, 3 Sep 2024 01:10:14 +0100 Subject: [PATCH] y --- modules/colorset-creator/modal/index.tsx | 20 +++++---- modules/colorset-creator/modal/palette.tsx | 2 +- .../slate/code-hightlighting.tsx | 41 ------------------- modules/colorset-creator/slate/components.tsx | 1 - 4 files changed, 12 insertions(+), 52 deletions(-) diff --git a/modules/colorset-creator/modal/index.tsx b/modules/colorset-creator/modal/index.tsx index 967c5ae..49f3727 100644 --- a/modules/colorset-creator/modal/index.tsx +++ b/modules/colorset-creator/modal/index.tsx @@ -35,7 +35,7 @@ export default function ModalContent() { const selectedEntity = entities.includes(_selectedEntity) ? _selectedEntity : getDefaultEntity(); return ( -
+
return (
-
    +
      {searchbar}
      @@ -157,18 +157,20 @@ export const EntityComponent = , ) => { return ( -
      +
      - {enitityManager instanceof PaletteManager && ( - - )} - {enitityManager instanceof ConfigletManager && ( - - )} +
      + {enitityManager instanceof PaletteManager && ( + + )} + {enitityManager instanceof ConfigletManager && ( + + )} +
      ); }; diff --git a/modules/colorset-creator/modal/palette.tsx b/modules/colorset-creator/modal/palette.tsx index c7ce506..fdd6d04 100644 --- a/modules/colorset-creator/modal/palette.tsx +++ b/modules/colorset-creator/modal/palette.tsx @@ -11,7 +11,7 @@ export interface PaletteColorSetsProps { } export const PaletteColorSets = ({ palette, paletteManager }: PaletteColorSetsProps) => { return ( -
      +
      {Object.entries(palette.data.getColors()).map(([set, colors]) => ( { return ( - { ); }; -const ExampleToolbar = () => { - return ( - - - - ); -}; - -const CodeBlockButton = () => { - const editor = useSlateStatic(); - const handleClick = () => { - Transforms.wrapNodes( - editor, - { type: CodeBlockType, language: "html", children: [] }, - { - match: (n) => Element.isElement(n) && n.type === ParagraphType, - split: true, - }, - ); - Transforms.setNodes( - editor, - { type: CodeLineType }, - { match: (n) => Element.isElement(n) && n.type === ParagraphType }, - ); - }; - - return ( - - ); -}; - const renderLeaf = (props: RenderLeafProps) => { const { attributes, children, leaf } = props; const { text, ...rest } = leaf; diff --git a/modules/colorset-creator/slate/components.tsx b/modules/colorset-creator/slate/components.tsx index 7b1aaa7..d8d7202 100644 --- a/modules/colorset-creator/slate/components.tsx +++ b/modules/colorset-creator/slate/components.tsx @@ -7,7 +7,6 @@ interface BaseProps { className: string; [key: string]: unknown; } -type OrNull = T | null; export const Button = React.forwardRef( (