Closed gabrielperales closed 7 years ago
I have updated the counter example to test stylesheets, and seems to work.
You can try it here https://github.com/gabrielperales/elm-native-ui/tree/stylesheet-example
Thank you! The code seems reasonable to me in general. What were the design concerns you had about this?
I did a new type and i called it as stylesheet, maybe it should have another name like styleId and the function to assign those could be stylesIds instead of stylesheet again
To me, an opaque type would make the most sense. So instead of
type alias StyleSheet =
Int
we would have
type StyleSheet
= StyleSheet Int
This would hide the details (of how the reference is passed) from the user and there would be no way to see that it's really just a number.
Ok, if you are happy with that and you think the type names are Ok, I can just do those changes and remove the WIP status.
This should close #17