Byteclaw / visage

Visage design system
https://visage.design
MIT License
12 stars 3 forks source link

Fix defaultProps definition on createComponent #688

Open michalkvasnicak opened 3 years ago

michalkvasnicak commented 3 years ago

This fails to typecheck

import { Chip as BaseChip, createComponent } from '@byteclaw/visage';

export const Chip = createComponent(BaseChip, {
  defaultProps: {
    labelProps: {
      styles: {
        px: 1,
        py: 1,
        lineHeight: '100%',
      },
    },
  },
  styles: {
    borderRadius: 'controlBorderRadius',
    fontSize: -1,
  },
});