Skip to content

Conversation

VladisLove3017
Copy link
Contributor

Description

add type to color props

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

Copy link

netlify bot commented Jul 5, 2025

👷 Deploy request for vuestic-docs accepted.

Name Link
🔨 Latest commit f8dd3aa
🔍 Latest deploy log https://app.netlify.com/projects/vuestic-docs/deploys/6868fc5210c3f70008377dcb

Copy link

netlify bot commented Jul 5, 2025

Deploy Preview for vuestic-storybook ready!

Name Link
🔨 Latest commit 09ca10e
🔍 Latest deploy log https://app.netlify.com/projects/vuestic-storybook/deploys/6868fed26e963a0008a91478
😎 Deploy Preview https://deploy-preview-4537--vuestic-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@m0ksem m0ksem changed the title fix#4535: add type to color props fix#4535: add type to color and icon props Jul 5, 2025
@m0ksem m0ksem requested review from m0ksem and Copilot July 5, 2025 10:21
Copy link
Contributor

@Copilot Copilot AI left a 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>> for color props
  • Introduces PropType<StringWithAutocomplete<VaIconName>> for icon props where applicable
  • Adds ColorName, VaIconName, and StringWithAutocomplete 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 add import { 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 to import { StringWithAutocomplete } from '../../utils/types/prop-type'.
import { StringWithAutocomplete } from '@/utils/types/prop-type'

@m0ksem m0ksem merged commit b5182cb into epicmaxco:develop Jul 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants