Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Registry #2927

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/www/public/registry/styles/default/list-element.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"files": [
{
"name": "list-element.tsx",
"content": "import React from 'react';\nimport { withRef, withVariants } from '@udecode/cn';\nimport { PlateElement } from '@udecode/plate-common';\nimport { cva } from 'class-variance-authority';\n\nconst listVariants = cva('m-0 ps-6', {\n variants: {\n variant: {\n ul: 'list-disc [&_ul]:list-[circle] [&_ul_ul]:list-[square]',\n ol: 'list-decimal',\n },\n },\n});\n\nconst ListElementVariants = withVariants(PlateElement, listVariants, [\n 'variant',\n]);\n\nexport const ListElement = withRef<typeof ListElementVariants>(\n ({ className, children, variant = 'ul', ...props }, ref) => {\n const Component = variant!;\n\n return (\n <ListElementVariants ref={ref} asChild {...props}>\n <Component>{children}</Component>\n </ListElementVariants>\n );\n }\n);\n"
"content": "import React from 'react';\nimport { withRef, withVariants } from '@udecode/cn';\nimport { PlateElement } from '@udecode/plate-common';\nimport { cva } from 'class-variance-authority';\n\nconst listVariants = cva('m-0 ps-6', {\n variants: {\n variant: {\n ul: 'list-disc [&_ul]:list-[circle] [&_ul_ul]:list-[square]',\n ol: 'list-decimal',\n },\n },\n});\n\nconst ListElementVariants = withVariants(PlateElement, listVariants, [\n 'variant',\n]);\n\nexport const ListElement = withRef<typeof ListElementVariants>(\n ({ children, variant = 'ul', ...props }, ref) => {\n const Component = variant!;\n\n return (\n <ListElementVariants ref={ref} asChild variant={variant} {...props}>\n <Component>{children}</Component>\n </ListElementVariants>\n );\n }\n);\n"
}
],
"type": "components:plate-ui"
Expand Down