mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-19 18:13:33 +08:00
16 lines
385 B
TypeScript
16 lines
385 B
TypeScript
import { Text } from "react-native";
|
|
import { TailwindProvider } from "../../../src";
|
|
|
|
export function Test({ isBold, isUnderline }) {
|
|
const classNames = [];
|
|
|
|
if (isBold) classNames.push("font-bold");
|
|
if (isUnderline) classNames.push("underline");
|
|
|
|
return (
|
|
<TailwindProvider>
|
|
<Text className={classNames.join(" ")}>Hello world!</Text>
|
|
</TailwindProvider>
|
|
);
|
|
}
|