refactor: replace as-child prop with as="template" in various components #570
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request involves a comprehensive update to replace the
as-child
prop withas="template"
across various Vue component files and documentation. This change ensures consistency and improves the developer experience by providing a unified approach to rendering elements or components.The most important changes include:
Component Updates:
.docs/.vitepress/components/InstallationTabs.vue
: Changedas-child
toas="template"
inTabsContent
component..docs/.vitepress/components/NewHeroCodeGroup.vue
: Updatedas-child
toas="template"
in the component rendering tabs..docs/components/Tooltip.vue
: Replacedas-child
withas="template"
in theTooltipTrigger
component..docs/components/demo/ContextMenu/css/index.vue
: Modifiedas-child
toas="template"
in theContextMenuTrigger
component..docs/components/demo/Dialog/css/index.vue
: UpdatedDialogClose
component to useas="template"
instead ofas-child
.Documentation Updates:
.docs/content/components/accordion.md
: Changed references ofasChild
toas="template"
in theAccordionTrigger
section..docs/content/components/dialog.md
: Updated documentation to reflect the use ofas="template"
instead ofasChild
for hiding titles and descriptions..docs/content/components/tooltip.md
: ReplacedasChild
withas="template"
in multiple instances within the tooltip documentation. (F4a4cee5L14R14, [1] [2].docs/content/overview/introduction.md
: Updated introduction to mention theas="template"
prop for better developer control..docs/content/utilities/primitive.md
: Changed the description and usage ofasChild
toas="template"
in the primitive utilities documentation. [1] [2]