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

developer wants to the value of an attribute to change based on the state of a parent. #5

Open
jumblerg opened this issue Apr 11, 2016 · 1 comment

Comments

@jumblerg
Copy link
Member

jumblerg commented Apr 11, 2016

in addition to being paired with a vector of values delimited by screen widths to support responsive layouts, attributes should also be able to accept a mapping of values that will change based on the predefined states of a component.

(hoplon.ui/button :w 200 :h 60 :color {:up 0xFFF :over 0xEEE :down :0xCCC :disabled 0x666} "Click Me")

this may not be an ideal long-term solution: overloading vectors and maps for this purpose, while syntactically convenient, is arguably semantically abusive. it may be worth considering custom types instead.

@jumblerg
Copy link
Member Author

jumblerg commented Dec 3, 2016

this is partially achieved by the state s function. this does not seem like the correct approach, however.

@jumblerg jumblerg changed the title support attribute state maps developer wants to change the value of an attribute based on the state of a parent. Dec 3, 2016
@jumblerg jumblerg changed the title developer wants to change the value of an attribute based on the state of a parent. developer wants to the value of an attribute to change based on the state of a parent. Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant