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

fix: numbering for nested ordered lists #349

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import UnorderedList from "../UnorderedList"

const ListItem = ({ content }: ListItemProps) => {
return (
<li className="my-5 pl-2 [&:has(>_ol)]:list-none [&:has(>_ul)]:list-none [&_>_p]:inline">
<li className="my-5 pl-2 [&_>_p]:inline">
{content.map((item, index) => {
if (item.type === "paragraph") {
return <Paragraph key={index} {...item} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ export const Nested: Story = {
type: "listItem",
content: [
{ type: "paragraph", content: [{ type: "text", text: "Item 2" }] },
],
},
{
type: "listItem",
content: [
{
type: "orderedList",
attrs: {
Expand All @@ -124,11 +119,6 @@ export const Nested: Story = {
type: "paragraph",
content: [{ type: "text", text: "Item 4" }],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ export const Nested: Story = {
type: "listItem",
content: [
{ type: "paragraph", content: [{ type: "text", text: "Item 2" }] },
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand All @@ -121,11 +116,6 @@ export const Nested: Story = {
type: "paragraph",
content: [{ type: "text", text: "Item 4" }],
},
],
},
{
type: "listItem",
content: [
{
type: "orderedList",
attrs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ export const Default: Story = {
},
],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand All @@ -210,11 +205,6 @@ export const Default: Story = {
},
],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand All @@ -236,11 +226,6 @@ export const Default: Story = {
type: "paragraph",
content: [{ type: "text", text: "Spam" }],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand Down Expand Up @@ -1199,11 +1184,6 @@ export const NoTable: Story = {
},
],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand All @@ -1219,11 +1199,6 @@ export const NoTable: Story = {
},
],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand All @@ -1245,11 +1220,6 @@ export const NoTable: Story = {
type: "paragraph",
content: [{ type: "text", text: "Spam" }],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand Down Expand Up @@ -1597,11 +1567,6 @@ export const SmallTable: Story = {
},
],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand All @@ -1617,11 +1582,6 @@ export const SmallTable: Story = {
},
],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand All @@ -1643,11 +1603,6 @@ export const SmallTable: Story = {
type: "paragraph",
content: [{ type: "text", text: "Spam" }],
},
],
},
{
type: "listItem",
content: [
{
type: "unorderedList",
content: [
Expand Down
Loading