0.0.3 • Published 7 months ago
@callstack/rspress-theme v0.0.3
Callstack Rspress Theme
Installation
To install the @callstack/rspress-theme package, use your package manager of choice.
For example, with npm:
npm install @callstack/rspress-themeOr with yarn:
yarn add @callstack/rspress-themeUsage
To use the rspress-theme package, you need to add the plugin to the Rspress configuration in the plugin section. You can also import components through named imports like Announcement. These components can be used in your .mdx files or added to the layout as described in the guide.
Adding the Plugin
In your rspress.config.ts file, import pluginCallstackTheme from @callstack/rspress-theme/plugin and add it to the plugins array:
import { defineConfig } from '@rspress/shared'
import { pluginCallstackTheme } from '@callstack/rspress-theme/plugin'
export default defineConfig({
plugins: [
pluginCallstackTheme(),
// other plugins
],
})Importing Components
You can import components from the theme as named imports:
import { Announcement } from '@callstack/rspress-theme'
// Use the component in your code