@ -3,12 +3,22 @@ import React from 'react';
|
||||
import type { Props } from '../types';
|
||||
import TodoItem from './TodoItem';
|
||||
|
||||
export default function ListItem({ children, node, attributes }: Props) {
|
||||
export default function ListItem({
|
||||
children,
|
||||
node,
|
||||
attributes,
|
||||
...props
|
||||
}: Props) {
|
||||
const checked = node.data.get('checked');
|
||||
|
||||
if (checked !== undefined) {
|
||||
return (
|
||||
<TodoItem checked={checked} node={node} {...attributes}>
|
||||
<TodoItem
|
||||
checked={checked}
|
||||
node={node}
|
||||
attributes={attributes}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</TodoItem>
|
||||
);
|
||||
|
Reference in New Issue
Block a user