Browse Source

fix(types): colorChip (#38298)

Small change to prevent types from being wrongly merged/narrowed (I'm trying to warm up my fingers after vacation with a few small PR's)
Jonas 2 years ago
parent
commit
4f406029bf
1 changed files with 8 additions and 8 deletions
  1. 8 8
      docs-ui/components/colorChip.tsx

+ 8 - 8
docs-ui/components/colorChip.tsx

@@ -5,11 +5,11 @@ import Color from 'color';
 import space from 'sentry/styles/space';
 import {Theme} from 'sentry/utils/theme';
 
-type SizeProp = {
+interface SizeProp {
   size: 'md' | 'lg';
-};
+}
 
-type Props = SizeProp & {
+interface Props extends SizeProp {
   /**
    * value is either a CSS color string (e.g. #000)
    * or a key in the theme object (e.g. 'blue300')
@@ -20,16 +20,16 @@ type Props = SizeProp & {
    * to replace the parsed color name with a custom name
    */
   textOverwrite?: string;
-};
+}
 
-type WrapperProps = SizeProp & {
+interface WrapperProps extends SizeProp {
   noText: boolean;
-};
+}
 
-type ColorSwatchProps = SizeProp & {
+interface ColorSwatchProps extends SizeProp {
   background: string;
   border: boolean;
-};
+}
 
 function ColorChip({value, size = 'md', noText = false, textOverwrite}: Props) {
   const theme = useTheme();