frontend client for gemstone. decentralised workplace app

feat: our text component

serenity 6c32c78b a5f261ea

Changed files
+25
src
components
primitives
+25
src/components/primitives/Text.tsx
···
+
import { useFacet } from "@/lib/facet";
+
import type { ReactNode } from "react";
+
import type { StyleProp, TextStyle } from "react-native";
+
// eslint-disable-next-line no-restricted-imports -- This is the component in question. We are re-exporting RN's base text component.
+
import { Text as RnText } from "react-native";
+
+
export const Text = ({
+
children,
+
style,
+
...props
+
}: {
+
children: ReactNode;
+
style?: StyleProp<TextStyle>;
+
}) => {
+
const { typography } = useFacet();
+
+
return (
+
<RnText
+
{...props}
+
style={[{ fontFamily: typography.families.primary }, style]}
+
>
+
{children}
+
</RnText>
+
);
+
};