rn-combine-style
v1.0.2
Published
A small utility that combine react native styles
Downloads
3
Maintainers
Readme
RN-Combine-Styles
A small utility that combine react native styles ✨
How to use
yarn add rn-combine-styles
import React, { useState } from "react";
import { View, StyleSheet } from "react-native";
import cs from "rn-combine-styles";
export default function Button({ text, style, disable = false, ...props }) {
return (
<View
style={cs(styles.button, { color: "black" }, [(styles.disable, disable)])}
>
{text}
</View>
);
}
const styles = StyleSheet.create({
button: {
backgroundColor: "red",
},
disable: {
backgroundColor: "blue",
},
});