0.0.10 • Published 5 years ago

styled-functors v0.0.10

Weekly downloads
11
License
MIT
Repository
github
Last release
5 years ago

styled-functors

Reason React Native UI Primatives

Primatives

  • <Box />
  • <Flex />
  • <T /> (text)

Installation

yarn add styled-functors

Then, add styled-functors to your bsconfig.json.

Example

open BsReactNative;
open StyledFunctors.Primatives;

let make = (_children, ~user: Server.user) => {
  ...component,
  render: _self =>
    <Flex p={`px(2.)} grow=true content=`center>
      <Flex p={`py(6.)}>
        <Flex p={`px(12.)}>
          <T f={`size(4.)} color=Palatte.white> {user.firstName |> str} </T>
        </Flex>
        <Box> Media.playerImage </Box>
      </Flex>
      <Flex grow=true content=`center p={`px(2.)} m={`mb(6.)}>
        <T color=Palatte.semiTransparent f={`size(2.0)}>
          {user.schoolName |> String.uppercase |> str}
        </T>
      </Flex>
    </Flex>,
};

Thoughts

Honestly not sure about this API. It was born out of prototyping needs - something where I could manipulate styles inline quickly.

Sure it's verbose, but have you seen styling in Reason?

Credits

Further Reading

License

Mit

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago