mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-16 20:21:22 +08:00
doc: Update react.md
cheatsheet.
This commit is contained in:
@ -124,6 +124,24 @@ function () {}
|
||||
|
||||
注释配置添加 `show-header` 类,放置在表格下面,表头将被展示出来。
|
||||
|
||||
### 代码行高亮
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```jsx {1,4-5}
|
||||
import React from "react";
|
||||
import "./Student.css";
|
||||
|
||||
export const Student = (
|
||||
<div className="Student"></div>
|
||||
);
|
||||
```
|
||||
|
||||
上面 `{1,4-5}` 行代码高亮,下面是 `Markdown` 代码示例
|
||||
|
||||
```markdown
|
||||
```jsx {1,4-5}
|
||||
```
|
||||
|
||||
### Tooltips
|
||||
|
||||
[鼠标移动到上面有提示](https://github.com/jaywcjlove/reference) _Tooltips 的提示内容_<!--rehype:tooltips-->
|
||||
@ -147,6 +165,8 @@ function () {}
|
||||
<!--rehype:style=background:#e91e63;-->
|
||||
```
|
||||
|
||||
在 H3 标题下面添加样式标注 `<!--rehype:style=background:#e91e63;-->`
|
||||
|
||||
### 快捷键样式
|
||||
|
||||
| Key | value |
|
||||
@ -157,6 +177,15 @@ function () {}
|
||||
|
||||
列表添加 `<!--rehype:className=shortcuts-->` 样式类,展示快捷键样式。
|
||||
|
||||
### 代码行号
|
||||
|
||||
```jsx showLineNumbers
|
||||
export const Student = (
|
||||
<div className="Student"></div>
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
### 内置类样式
|
||||
|
||||
:- | -
|
||||
|
Reference in New Issue
Block a user