Skip to content

Commit 9de6579

Browse files
committed
fix: address PR review feedback
- Add rspress-custom-theme to README.md for discoverability - Remove misleading "etc." from complete icons list - Add React type import to Icon type snippet
1 parent aada106 commit 9de6579

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ npx skills add rstackjs/agent-skills --skill rspress-v2-upgrade
124124

125125
Migrate Rspress projects from v1 to v2. Use when a user asks to upgrade Rspress, follow the v1-to-v2 guide, update packages/configs/themes, or validate the upgrade.
126126

127+
### rspress-custom-theme
128+
129+
```bash
130+
npx skills add rstackjs/agent-skills --skill rspress-custom-theme
131+
```
132+
133+
Customize Rspress themes using CSS variables, Layout slots, component wrapping, or component ejection. Use when a user wants to change the look and feel of an Rspress site, override theme components, add custom navigation/sidebar/footer content, inject global providers, or modify the default Rspress theme in any way.
134+
127135
### rspress-description-generator
128136

129137
```bash

skills/rspress-custom-theme/SKILL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ Rspress has 27 built-in icons used across the UI. You can replace any of them by
147147
**Icon type**: Each icon is a React component or a URL string:
148148

149149
```ts
150-
type Icon = React.FC<React.SVGProps<SVGSVGElement>> | string;
150+
import type { FC, SVGProps } from 'react';
151+
type Icon = FC<SVGProps<SVGSVGElement>> | string;
151152
```
152153

153154
**Example 1** — Replace an icon with a custom SVG component:
@@ -157,7 +158,7 @@ type Icon = React.FC<React.SVGProps<SVGSVGElement>> | string;
157158
export * from '@rspress/core/theme-original';
158159

159160
// Named export overrides the wildcard — replaces the GitHub icon site-wide
160-
export const IconGithub: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
161+
export const IconGithub = (props: React.SVGProps<SVGSVGElement>) => (
161162
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
162163
<path d="M12 2C6.477 2 2 6.484 2 12.017c0 ..." fill="currentColor" />
163164
</svg>
@@ -182,7 +183,7 @@ import { SvgWrapper, IconGithub } from '@rspress/core/theme';
182183
<SvgWrapper icon={IconGithub} width={24} height={24} />
183184
```
184185

185-
**Available icons**: `IconArrowDown`, `IconArrowRight`, `IconClose`, `IconCopy`, `IconDeprecated`, `IconDown`, `IconEdit`, `IconEmpty`, `IconExperimental`, `IconExternalLink`, `IconFile`, `IconGithub`, `IconGitlab`, `IconHeader`, `IconJump`, `IconLink`, `IconLoading`, `IconMenu`, `IconMoon`, `IconScrollToTop`, `IconSearch`, `IconSmallMenu`, `IconSuccess`, `IconSun`, `IconTitle`, `IconWrap`, `IconWrapped` etc.
186+
**Available icons**: `IconArrowDown`, `IconArrowRight`, `IconClose`, `IconCopy`, `IconDeprecated`, `IconDown`, `IconEdit`, `IconEmpty`, `IconExperimental`, `IconExternalLink`, `IconFile`, `IconGithub`, `IconGitlab`, `IconHeader`, `IconJump`, `IconLink`, `IconLoading`, `IconMenu`, `IconMoon`, `IconScrollToTop`, `IconSearch`, `IconSmallMenu`, `IconSuccess`, `IconSun`, `IconTitle`, `IconWrap`, `IconWrapped`.
186187

187188
> **Source**: See the [icons source](https://github.com/web-infra-dev/rspress/blob/main/packages/core/src/theme/icons.ts) for default implementations.
188189

0 commit comments

Comments
 (0)