Skip to content

Commit

Permalink
fix: checkbox position
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Sep 8, 2023
1 parent 457d6c6 commit f98c7ff
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/components/ui/markdown/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ export const Markdown: FC<MdProps & MarkdownToJSX.Options & PropsWithChildren> =
gfmTask: {
react(node, _, state) {
return (
<label
className="mr-2 inline-flex items-center"
<input
type="checkbox"
key={state?.key}
>
<input type="checkbox" checked={node.completed} readOnly />
</label>
checked={node.completed}
readOnly
/>
)
},
},
Expand Down
53 changes: 51 additions & 2 deletions src/components/ui/markdown/customize.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,55 @@
## Basic
## List and GFM Tasks

### Table
1. First
2. Second
1. 2.1
2. 2.2
1. 3.1
3. Third
4. Fourth

- [ ] Checkbox
- [x] Checkbox Completed

---

- Line
- Line 1.1
- Line 2

## Definition lists

Term 1

: Definition 1
with lazy continuation.

Term 2 with _inline markup_

: Definition 2

{ some code, part of Definition 2 }

Third paragraph of definition 2.

_Compact style:_

Term 1
~ Definition 1

Term 2
~ Definition 2a
~ Definition 2b

## [Abbreviations](https://github.com/markdown-it/markdown-it-abbr)

This is HTML abbreviation example.

It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on.

\*[HTML]: Hyper Text Markup Language

## Table

| 表达内容 | 示例 |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/markdown/markdown.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}

input[type='checkbox'] {
@apply checkbox;
@apply checkbox checkbox-xs my-0 mr-2 align-text-bottom;
}

input[type='checkbox']:disabled,
Expand Down

1 comment on commit f98c7ff

@vercel
Copy link

@vercel vercel bot commented on f98c7ff Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

springtide.vercel.app
shiro-innei.vercel.app
shiro-git-main-innei.vercel.app
innei.in

Please sign in to comment.