10000 feat(default-theme): make VPButton slottable by TheAlexLichter · Pull Request #4689 · vuejs/vitepress · GitHub
[go: up one dir, main page]

Skip to content

feat(default-theme): make VPButton slottable #4689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

TheAlexLichter
Copy link
Contributor

Description

This PR makes the text prop of the VPButton component optional and allows using a slot instead, falling back to the text prop if the slot is not used.

Using a slot allows adding SVGs or more complex constructs (e.g. styling through spans).

@brc-dd brc-dd merged commit 0b70397 into vuejs:main Apr 14, 2025
9 checks passed
@TheAlexLichter TheAlexLichter deleted the patch-1 branch April 14, 2025 17:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0