Files
outline/app/components/Editor/components/ListItem.js
T
2017-11-08 00:08:35 -08:00

18 lines
433 B
JavaScript

// @flow
import React from 'react';
import type { Props } from '../types';
import TodoItem from './TodoItem';
export default function ListItem({ children, node, attributes }: Props) {
const checked = node.data.get('checked');
if (checked !== undefined) {
return (
<TodoItem checked={checked} node={node} {...attributes}>
{children}
</TodoItem>
);
}
return <li {...attributes}>{children}</li>;
}