f-f / purescript-react-basic-native

Apache License 2.0
60 stars 18 forks source link

defining stylesheets #30

Open joprice opened 3 years ago

joprice commented 3 years ago

I see a stylesheet defined in js in the examples, but is there a way to create stylesheets in purescript, maybe in combination using another library? I checked the generated code in case I missed something.

joprice commented 3 years ago

I poked around a bit more and found that the style type is CSS, an opaque foreign type that seems to accept any record:

RN.view
  { style:
    css
    { alignItems: "left"
    , backgroundColor: "#fff"
    }