Skip to content

Commit

Permalink
i18n(zh-cn): Update sidebar.mdx (#1967)
Browse files Browse the repository at this point in the history
Co-authored-by: liruifengv <[email protected]>
  • Loading branch information
huyikai and liruifengv authored Jun 6, 2024
1 parent bc7fb2b commit 0463cf6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/src/content/docs/zh-cn/guides/sidebar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,15 @@ starlight({
]}
/>

### 徽章种类
### 徽章种类和自定义样式

使用具有 `text``variant` 属性的对象自定义徽章样式。
使用具有 `text``variant``class` 属性的对象自定义徽章样式。

`text` 属性表示要显示的内容(例如 "New")。
通过将 `variant` 属性设置为以下值之一:`note``tip``danger``caution``success`,可以覆盖 `default` 样式,默认样式使用你的网站的强调色。

默认情况下,徽章将使用你的网站的强调色。要使用内置的徽章样式,请将 `variant` 属性设置为以下值之一:`note``tip``danger``caution``success`

你还可以通过设置 `class` 属性为一个 CSS 类名来创建自定义的徽章样式。

```js {10}
starlight({
Expand Down

0 comments on commit 0463cf6

Please sign in to comment.