-
Notifications
You must be signed in to change notification settings - Fork 11
feat: ribbon component #176
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
| * The alert type | ||
| */ | ||
| type: 'info' | 'success' | 'warning' | 'critical' | 'error' | ||
| type: 'info' | 'success' | 'warning' | 'critical' | 'danger' | 'neutral' |
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.
You can use export type AcvAlertRibbonVariant = typeof ALERT_RIBBON_VARIANT[keyof typeof ALERT_RIBBON_VARIANT];
Or the same type from Alert component
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.
or rename it to TYPE
| * The alert type | ||
| */ | ||
| type: 'info' | 'success' | 'warning' | 'critical' | 'error' | ||
| type: 'info' | 'success' | 'warning' | 'critical' | 'danger' | 'neutral' |
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.
or rename it to TYPE
| </template> | ||
|
|
||
| <style scoped> | ||
| <style lang="scss" scoped> |
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 dont use scss in components styles
ca0c61a to
c7d6ef8
Compare
| * The alert type | ||
| */ | ||
| type: 'info' | 'success' | 'warning' | 'critical' | 'error' | ||
| type: keyof typeof TYPE |
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.
i would rather create a separate typescript type to make it available in exported types later
| <script setup lang="ts"> | ||
| import type { AcvRibbonEvents, AcvRibbonLink, AcvRibbonProps, AcvRibbonSlots } from './ribbon.ts'; | ||
| import Alert from '@/components/alert/alert.vue'; | ||
| import Button from '@/components/button/button.vue'; |
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.
Its better to use consistent names in imports ie AcvAlert, AcvButton
c7d6ef8 to
e878870
Compare
Type of change
Description
Implemented ribbon component