Merge pull request #394 from jorilallo/issue-392

Fixed todo list items
This commit is contained in:
Jori Lallo
2017-11-10 11:52:59 -08:00
committed by GitHub

View File

@ -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>
);