Nutella with Pepperoni and Mushrooms

    @borjomeeee/rn-styles
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.9 • Public • Published

    rn-styles

    This lib i use in my work for easy styling components in react-native. This idea i took from https://github.com/farwayer/react-native-tstyles

    Installation

    yarn add @borjomeeee/rn-styles
    // npm i @borjomeeee/rn-styles --save

    Example of usage

    Note! colors can only satisfy #fff, #ffffff, #ffffff00 tempaltes

    import React from "react";
    import * as RN from "react-native";
    
    import s, { configureVariables } from "@borjomeeee/rn-styles";
    
    configureVariables({
      black: "#000000",
    });
    
    const AwesomeStylingScreen = () => {
      return (
        <RN.View style={s(`fill aic jcc`)}>
          <RN.View style={s(`w:100 h:100 bgc:#ff0000`)}>
            <RN.Text style={s(`fsz:24 c:black`)}>Hello, world!</RN.Text>
          </RN.View>
        </RN.View>
      );
    };

    TODO

    • [x] Decimal numbers support
    • [ ] Extend default list styles
    • [ ] Work with colors more nicely
    • [ ] Conduct perfomance testing

    Install

    npm i @borjomeeee/rn-styles

    DownloadsWeekly Downloads

    12

    Version

    2.0.9

    License

    MIT

    Unpacked Size

    12 kB

    Total Files

    15

    Last publish

    Collaborators

    • borjomeeee