-
Notifications
You must be signed in to change notification settings - Fork 359
fix#4535: add type to color and icon props #4537
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
Conversation
👷 Deploy request for vuestic-docs accepted.
|
✅ Deploy Preview for vuestic-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances type safety for color
and icon
props across various UI components by using StringWithAutocomplete
and ColorName
/VaIconName
types.
- Introduces
PropType<StringWithAutocomplete<ColorName>>
forcolor
props - Introduces
PropType<StringWithAutocomplete<VaIconName>>
foricon
props where applicable - Adds
ColorName
,VaIconName
, andStringWithAutocomplete
imports; updates a playground example to illustrate custom color usage
Reviewed Changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/ui/src/components/va-toast/VaToast.vue | add typed color prop |
packages/ui/src/components/va-time-input/VaTimeInput.vue | add typed icon and color props |
packages/ui/src/components/va-tabs/VaTabs.vue | add typed color prop |
packages/ui/src/components/va-switch/VaSwitch.vue | add typed color prop |
packages/ui/src/components/va-stepper/VaStepperStepButton.vue | add typed color prop |
packages/ui/src/components/va-stepper/VaStepper.vue | add typed color prop |
packages/ui/src/components/va-slider/VaSlider.vue | add typed color prop |
packages/ui/src/components/va-skeleton/VaSkeleton.vue | add typed color prop |
packages/ui/src/components/va-sidebar/VaSidebar.vue | add typed color prop |
packages/ui/src/components/va-select/VaSelect.vue | add typed color prop |
packages/ui/src/components/va-scroll-container/VaScrollContainer.vue | add typed color prop |
packages/ui/src/components/va-radio/VaRadio.vue | add typed color prop |
packages/ui/src/components/va-progress-circle/VaProgressCircle.vue | add typed color prop |
packages/ui/src/components/va-progress-bar/VaProgressBar.vue | add typed color prop |
packages/ui/src/components/va-popover/VaPopover.vue | add typed color and icon props |
packages/ui/src/components/va-pagination/VaPagination.vue | add typed color prop |
packages/ui/src/components/va-option-list/VaOptionList.vue | add typed color prop |
packages/ui/src/components/va-navbar/VaNavbar.vue | add typed color prop |
packages/ui/src/components/va-message-list/VaMessageList.vue | add typed color prop |
packages/ui/src/components/va-list/VaListLabel.vue | add typed color prop |
packages/ui/src/components/va-input-wrapper/VaInputWrapper.vue | add typed color prop |
packages/ui/src/components/va-inner-loading/VaInnerLoading.vue | add typed color and icon props |
packages/ui/src/components/va-icon/VaIcon.vue | add typed color prop |
packages/ui/src/components/va-file-upload/VaFileUpload.vue | add typed color prop |
packages/ui/src/components/va-divider/VaDivider.vue | add typed color prop |
packages/ui/src/components/va-date-picker/VaDatePicker.vue | add typed color prop |
packages/ui/src/components/va-date-input/VaDateInput.vue | add typed color and icon props |
packages/ui/src/components/va-counter/VaCounter.vue | add typed color prop |
packages/ui/src/components/va-color-indicator/VaColorIndicator.vue | add typed color prop |
packages/ui/src/components/va-collapse/VaCollapse.vue | add typed color and icon props |
packages/ui/src/components/va-chip/VaChip.vue | add typed icon prop |
packages/ui/src/components/va-checkbox/VaCheckbox.vue | add typed color prop |
packages/ui/src/components/va-carousel/VaCarouselV2.vue | add typed color prop |
packages/ui/src/components/va-carousel/VaCarousel.vue | add typed color prop |
packages/ui/src/components/va-card/VaCard.vue | add typed color prop |
packages/ui/src/components/va-button/VaButton.vue | add typed icon prop |
packages/ui/src/components/va-breadcrumbs/VaBreadcrumbs.vue | add typed color prop |
packages/ui/src/components/va-badge/VaBadge.vue | add typed color prop |
packages/ui/src/components/va-backtop/VaBacktop.vue | add typed color prop |
packages/ui/src/components/va-avatar/VaAvatar.vue | add typed color and icon props |
packages/ui/src/components/va-app-bar/VaAppBar.vue | add typed color prop |
packages/ui/src/components/va-alert/VaAlert.vue | add typed color and icon props |
packages/compiler/playground/src/App.vue | update example with color prop usage |
Comments suppressed due to low confidence (2)
packages/ui/src/components/va-toast/VaToast.vue:82
- The
StringWithAutocomplete
type is used here but not imported; please addimport { StringWithAutocomplete } from '../../utils/types/prop-type'
at the top.
color: { type: String as PropType<StringWithAutocomplete<ColorName>>, default: 'primary' },
packages/ui/src/components/va-input-wrapper/VaInputWrapper.vue:136
- The import path uses an alias (
@/...
) but all other components use a relative path; update this toimport { StringWithAutocomplete } from '../../utils/types/prop-type'
.
import { StringWithAutocomplete } from '@/utils/types/prop-type'
Description
add type to color props
Types of changes