Skip to content

Commit 3207806

Browse files
authored
docs: rename eject-only tag to theme-only (#3169)
1 parent bac4448 commit 3207806

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

website/docs/en/ui/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"type": "dir",
3535
"label": "Layout Components",
3636
"name": "layout-components",
37-
"tag": "eject-only"
37+
"tag": "theme-only"
3838
},
3939
{
4040
"type": "section-header",

website/docs/en/ui/icons/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: List of Rspress built-in icons and how to replace them via custom theme.
3-
tag: eject-only
3+
tag: theme-only
44
---
55

66
# Built-in icons

website/docs/en/ui/layout-components/tag.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The component has built-in common tags that display with `<Badge />`. All common
8181

8282
The Tag component is ejectable. When you want to extend common tags, you can use wrap/eject to modify the Tag component. The tag value is passed as props to the Tag component.
8383

84-
Here's an example from this site adding a custom `eject-only` tag through wrap:
84+
Here's an example from this site adding a custom `theme-only` tag through wrap:
8585

8686
```tsx title="theme/components/Tag/index.tsx"
8787
import {
@@ -90,16 +90,16 @@ import {
9090
} from '@rspress/core/theme-original';
9191

9292
export const Tag = ({ tag }: { tag: string }) => {
93-
if (tag === 'eject-only') {
94-
return <BasicBadge text="eject-only" type="warning" />;
93+
if (tag === 'theme-only') {
94+
return <BasicBadge text="theme-only" type="warning" />;
9595
}
9696
return <BasicTag tag={tag} />;
9797
};
9898
```
9999

100100
```mdx title="index.mdx"
101101
---
102-
tag: new, eject-only
102+
tag: new, theme-only
103103
---
104104
```
105105

website/docs/zh/ui/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"type": "dir",
3535
"label": "布局组件",
3636
"name": "layout-components",
37-
"tag": "eject-only"
37+
"tag": "theme-only"
3838
},
3939
{
4040
"type": "section-header",

website/docs/zh/ui/icons/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Rspress 内置图标列表,以及如何通过自定义主题替换图标。
3-
tag: eject-only
3+
tag: theme-only
44
---
55

66
# 内置图标

website/docs/zh/ui/layout-components/tag.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ tag: new, experimental
8181

8282
Tag 组件是 ejectable 的,当你想扩充常用标签时,可使用 wrap/eject 来对 Tag 组件进行修改,tag 的值会作为 props 传递给 Tag 组件。
8383

84-
以下是一个本站通过 wrap 增加 `eject-only` 自定义标签的使用示例:
84+
以下是一个本站通过 wrap 增加 `theme-only` 自定义标签的使用示例:
8585

8686
```tsx title="theme/components/Tag/index.tsx"
8787
import {
@@ -90,16 +90,16 @@ import {
9090
} from '@rspress/core/theme-original';
9191

9292
export const Tag = ({ tag }: { tag: string }) => {
93-
if (tag === 'eject-only') {
94-
return <BasicBadge text="eject-only" type="warning" />;
93+
if (tag === 'theme-only') {
94+
return <BasicBadge text="theme-only" type="warning" />;
9595
}
9696
return <BasicTag tag={tag} />;
9797
};
9898
```
9999

100100
```mdx title="index.mdx"
101101
---
102-
tag: new, eject-only
102+
tag: new, theme-only
103103
---
104104
```
105105

website/theme/components/Tag/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export const Tag = ({ tag }: { tag?: string }) => {
88
return null;
99
}
1010

11-
if (tag === 'eject-only') {
12-
return <BasicBadge text="eject-only" type="warning" />;
11+
if (tag === 'theme-only') {
12+
return <BasicBadge text="theme-only" type="warning" />;
1313
}
1414
if (tag === 'non-ejectable') {
1515
return <BasicBadge text="non-ejectable" type="danger" />;

0 commit comments

Comments
 (0)