Skip to content

Export Badge component for custom Theme #3430

@peterroe

Description

@peterroe

Is your feature request related to a problem? Please describe.

I want to use Badge component in my custom theme. And the Badge component not exportd by vitepress/theme

So I can do this only:

import Theme from 'vitepress/theme'

export default {
	...Theme,
	enhanceApp(ctx) {
	 	Theme.enhanceApp(ctx)
		// Custom content
	}
}

Describe the solution you'd like

So I' d like to import Badge from vitepress/theme directly

import { Badge } from 'vitepress/theme'

export default {
	...Theme,
	enhanceApp(ctx) {
	 	ctx.app.component('Badge', VPBadge);
		// Custom content
	}
}

Describe alternatives you've considered

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution welcomeThe team would welcome a contribution from the community for this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions