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

Add Stylesheet Management to Props in Reka.js #44

Open
Savvy1354 opened this issue Jun 15, 2023 · 1 comment
Open

Add Stylesheet Management to Props in Reka.js #44

Savvy1354 opened this issue Jun 15, 2023 · 1 comment

Comments

@Savvy1354
Copy link

Savvy1354 commented Jun 15, 2023

Hello,

I've been utilizing Reka.js and find it to be a powerful tool for managing dynamic components and state. However, I have found a potential area for enhancement in the way Reka.js handles stylesheets.

Currently, it is possible to manage an entire stylesheet within the props of a component, but this can become cumbersome and difficult to manage for more complex components with numerous styles. I believe it would be beneficial to have the ability to manage decomposed stylesheets within the props. This would allow developers to handle individual styling properties such as padding, background color, and so on, independently, providing greater flexibility and control over the styling of components.

In addition, I've considered using the global variables feature provided by Reka.js to facilitate style inheritance. However, I'm cautious about making changes directly to the library, as I don't want to disrupt its existing functionality.

I would appreciate your thoughts on whether these changes should be incorporated within the library or managed externally. If the changes are to be incorporated within the library, I'm interested in understanding the best approach to take that would avoid disrupting current functionality.

Thank you for your time and consideration.

@prevwong
Copy link
Owner

Hi there, I'm not sure if I fully understand the feature request, do you mind showing some examples?

Do you mean to support something like this in Reka:

const Button = (props) => {
  return (
     <button style={{ background: "#333", ...props.style}}>My Button</button>
   )
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants