-
-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3727 from udecode/feat/block
Fix blocks
- Loading branch information
Showing
28 changed files
with
232 additions
and
53 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"dependencies": [ | ||
"@udecode/plate-list" | ||
], | ||
"doc": { | ||
"description": "A checkbox list element with interactive todo items.", | ||
"docs": [ | ||
{ | ||
"route": "/docs/list", | ||
"title": "List" | ||
} | ||
], | ||
"examples": [ | ||
"list-demo" | ||
] | ||
}, | ||
"files": [ | ||
{ | ||
"content": "'use client';\n\nimport React from 'react';\n\nimport { cn, withRef } from '@udecode/cn';\nimport {\n useTodoListElement,\n useTodoListElementState,\n} from '@udecode/plate-list/react';\n\nimport { Checkbox } from './checkbox';\nimport { PlateElement } from './plate-element';\n\nexport const TodoListElement = withRef<typeof PlateElement>(\n ({ children, className, ...props }, ref) => {\n const { element } = props;\n const state = useTodoListElementState({ element });\n const { checkboxProps } = useTodoListElement(state);\n\n return (\n <PlateElement\n ref={ref}\n className={cn('flex flex-row py-1', className)}\n {...props}\n >\n <div\n className=\"mr-1.5 flex select-none items-center justify-center\"\n contentEditable={false}\n >\n <Checkbox {...checkboxProps} />\n </div>\n <span\n className={cn(\n 'flex-1 focus:outline-none',\n state.checked && 'text-muted-foreground line-through'\n )}\n contentEditable={!state.readOnly}\n suppressContentEditableWarning\n >\n {children}\n </span>\n </PlateElement>\n );\n }\n);\n", | ||
"path": "plate-ui/todo-list-element.tsx", | ||
"target": "components/plate-ui/todo-list-element.tsx", | ||
"type": "registry:ui" | ||
} | ||
], | ||
"name": "todo-list-element", | ||
"registryDependencies": [ | ||
"checkbox", | ||
"plate-element" | ||
], | ||
"type": "registry:ui" | ||
} |
Oops, something went wrong.