Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

color interface #74

Closed
BillyG83 opened this issue Jan 20, 2022 · 3 comments · Fixed by #456
Closed

color interface #74

BillyG83 opened this issue Jan 20, 2022 · 3 comments · Fixed by #456
Assignees
Labels
feature New feature or request help wanted Extra attention is needed

Comments

@BillyG83
Copy link
Contributor

BillyG83 commented Jan 20, 2022

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'

@MarlenAw MarlenAw linked a pull request Jan 22, 2022 that will close this issue
@gat786
Copy link

gat786 commented Jan 24, 2022

Is someone working on this already?

@BillyG83
Copy link
Contributor Author

there has been solutions offered in Discord but no PR yet @gat786

@BillyG83 BillyG83 added feature New feature or request help wanted Extra attention is needed labels Mar 6, 2022
@AbhinavMV AbhinavMV self-assigned this Apr 13, 2022
@AbhinavMV
Copy link
Collaborator

Instead of interface, string enums might be more useful here
What do you think @BillyG83 @locothedev ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants