-
-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
apps/www/public/r/styles/default/indent-todo-marker-component.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"dependencies": [ | ||
"@udecode/plate-indent-list" | ||
], | ||
"files": [ | ||
{ | ||
"content": "import type { PlateRenderElementProps } from '@udecode/plate-common/react';\n\nimport { cn } from '@udecode/cn';\nimport {\n useIndentTodoListElement,\n useIndentTodoListElementState,\n} from '@udecode/plate-indent-list/react';\n\nimport { Checkbox } from './checkbox';\n\nexport const TodoMarker = ({\n element,\n}: Omit<PlateRenderElementProps, 'children'>) => {\n const state = useIndentTodoListElementState({ element });\n const { checkboxProps } = useIndentTodoListElement(state);\n\n return (\n <div contentEditable={false}>\n <Checkbox\n style={{ left: -24, position: 'absolute', top: 4 }}\n {...checkboxProps}\n />\n </div>\n );\n};\n\nexport const TodoLi = (props: PlateRenderElementProps) => {\n const { children, element } = props;\n\n return (\n <span\n className={cn(\n (element.checked as boolean) && 'text-muted-foreground line-through'\n )}\n >\n {children}\n </span>\n );\n};\n", | ||
"path": "plate-ui/indent-todo-marker-component.tsx", | ||
"target": "", | ||
"type": "registry:ui" | ||
} | ||
], | ||
"name": "indent-todo-marker-component", | ||
"registryDependencies": [ | ||
"checkbox" | ||
], | ||
"type": "registry:ui" | ||
} |
18 changes: 18 additions & 0 deletions
18
apps/www/public/r/styles/default/indent-todo-toolbar-button.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"dependencies": [ | ||
"@udecode/plate-indent-list" | ||
], | ||
"files": [ | ||
{ | ||
"content": "import { withRef } from '@udecode/cn';\nimport {\n useIndentTodoToolBarButton,\n useIndentTodoToolBarButtonState,\n} from '@udecode/plate-indent-list/react';\n\nimport { Icons } from '@/components/icons';\n\nimport { ToolbarButton } from './toolbar';\n\nexport const IndentTodoToolbarButton = withRef<typeof ToolbarButton>(\n (rest, ref) => {\n const state = useIndentTodoToolBarButtonState({ nodeType: 'todo' });\n const { props } = useIndentTodoToolBarButton(state);\n\n return (\n <ToolbarButton ref={ref} tooltip=\"Todo\" {...props} {...rest}>\n <Icons.todo />\n </ToolbarButton>\n );\n }\n);\n", | ||
"path": "plate-ui/indent-todo-toolbar-button.tsx", | ||
"target": "", | ||
"type": "registry:ui" | ||
} | ||
], | ||
"name": "indent-todo-toolbar-button", | ||
"registryDependencies": [ | ||
"toolbar" | ||
], | ||
"type": "registry:ui" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters