-
Notifications
You must be signed in to change notification settings - Fork 455
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
feat: rating button #2820
feat: rating button #2820
Conversation
…nto feat/sfui2-673-rating-button
|
packages/sfui/frameworks/vue/components/SfRatingButton/SfRatingButton.vue
Outdated
Show resolved
Hide resolved
packages/sfui/frameworks/react/components/SfIcons/SfIconStar.tsx
Outdated
Show resolved
Hide resolved
packages/sfui/frameworks/react/components/SfRatingButton/SfRatingButton.tsx
Outdated
Show resolved
Hide resolved
packages/sfui/frameworks/vue/components/SfRatingButton/SfRatingButton.vue
Outdated
Show resolved
Hide resolved
packages/sfui/frameworks/vue/components/SfRatingButton/SfRatingButton.vue
Outdated
Show resolved
Hide resolved
packages/tests/components/SfRatingButton/SfRatingButton.PageObject.ts
Outdated
Show resolved
Hide resolved
…nto feat/sfui2-673-rating-button
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.
packages/sfui/frameworks/react/components/SfRatingButton/SfRatingButton.tsx
Outdated
Show resolved
Hide resolved
packages/sfui/frameworks/react/components/SfRatingButton/types.ts
Outdated
Show resolved
Hide resolved
packages/sfui/frameworks/vue/components/SfRatingButton/SfRatingButton.vue
Outdated
Show resolved
Hide resolved
const iconSize: Record<SfRatingButtonSize, SfRatingButtonIconSize> = { | ||
[SfRatingButtonSize.sm]: SfIconSize.base, | ||
[SfRatingButtonSize.base]: SfIconSize.lg, | ||
[SfRatingButtonSize.lg]: SfIconSize.xl, | ||
}; |
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.
we can extract this outside component as well
interface Props { | ||
value?: number; | ||
onChange?: (value: number) => void; | ||
max?: number; | ||
name?: string; | ||
disabled?: boolean; | ||
label?: string; | ||
labelClassName?: string; | ||
size?: `${SfRatingButtonSize}`; | ||
getLabelText?: (value: number) => string; | ||
} | ||
|
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.
question: those are copy paste from https://github.com/vuestorefront/storefront-ui/pull/2820/files#diff-8fcdae6ac93bc10b998e13c1280c073dd3e3ff2cac241eafea1e74d5ebe84ca0R13 why not reuse those ?
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.
looks good from my side!
[storefront-ui-react] Kudos, SonarCloud Quality Gate passed! |
[storefront-ui-vue] Kudos, SonarCloud Quality Gate passed! |
Related issue
Closes SFUI2-673
Scope of work
This PR adds new base component – SfRatingButton.
Screenshots of visual changes
Checklist