styled-components / xstyled

A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
https://xstyled.dev
MIT License
2.27k stars 107 forks source link

Is there any way to remove color preset in colors property? #417

Open creatrip-seungwoo opened 5 months ago

creatrip-seungwoo commented 5 months ago

I am making Box Component using @xstyled/system and styled-component like this.

export type BoxProps = SystemProps<typeof theme>;

const Box = styled.div<BoxProps>(system);

export default Box;

and i want to see only the colors i defined in theme object.

export interface Colors {
  primary: string;
  ...
}

export const theme = {
  colors: {
    primary: '#efefef',
    ...
  }
}

but when i try to input color prop in Box Components, there are suggestions including color preset.

image

is there any way to show only the colors i defined in theme objects?