icon.ts 712 B

1234567891011121314151617181920212223242526272829
  1. import { buildProps, definePropType } from '@kankan-components/utils'
  2. import type { ExtractPropTypes } from 'vue'
  3. import type Icon from './icon.vue'
  4. export const iconProps = buildProps({
  5. type: { type: String },
  6. size: {
  7. type: definePropType<number | string>([Number, String]),
  8. },
  9. color: { type: String },
  10. small: { type: Boolean },
  11. ctrl: { type: Boolean },
  12. medium: { type: Boolean },
  13. big: { type: Boolean },
  14. disabled: { type: Boolean },
  15. tip: { type: String },
  16. tipH: {
  17. type: String,
  18. default: 'center',
  19. },
  20. tipV: {
  21. type: String,
  22. default: 'bottom',
  23. },
  24. })
  25. export type IconProps = ExtractPropTypes<typeof iconProps>
  26. export type IconInstance = InstanceType<typeof Icon>