-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Objective
Add <List> and <ListItem> components:
const List = ({ children, format }) => (
<Stack
indent
style={{
listStyleType: format === "ordered" ? "decimal" : format === "unordered" ? "bullet" : null,
}}
tagName={format === "ordered" ? "ol" : "ul"}
>
{children}
</Stack>
);
const ListItem = ({ children }) => <li style={{ listStyleType: "inherit" }}>{children}</li>;Rationale
This makes it cleaner/easier to put together simple lists:
<List ordered>
<ListItem>This is an item.</ListItem>
</List>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels