You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pretty simple task for Typescript fans, please add a color interface for all components to be passed various color props
only use colors from /styles/colors.js
make a new /interface folder there is more that can be centralised like Input validations and others if you want to do that too, great.
MORE INFO:
To be more clear i would expect this end result, sorry for the confusion i caused.
<AnyComponent bgColor={green} textColor={white}
AnyComponent: don't worry about what component it is and also you do not need to add bgColor or textColor props to every component. Instead imagine that this component is completed and in our kit, plus it has these props setup and ready to use.
When setting bgColor I should use the interface we want built in this task, so it can only be set to the string names of the colors we use in /styles/colors.js and it will return the correct HEX.
So 'green' = '#68738D'
The text was updated successfully, but these errors were encountered:
Pretty simple task for Typescript fans, please add a color interface for all components to be passed various color props
/styles/colors.js
/interface
folder there is more that can be centralised like Input validations and others if you want to do that too, great.MORE INFO:
To be more clear i would expect this end result, sorry for the confusion i caused.
AnyComponent: don't worry about what component it is and also you do not need to add bgColor or textColor props to every component. Instead imagine that this component is completed and in our kit, plus it has these props setup and ready to use.
When setting bgColor I should use the interface we want built in this task, so it can only be set to the string names of the colors we use in
/styles/colors.js
and it will return the correct HEX.So 'green' = '#68738D'
The text was updated successfully, but these errors were encountered: