UNPKG

alouette

Version:

A modern, customizable design system built on top of NativeWind v5 with configurable defaults

18 lines (14 loc) • 501 B
import { type ReactNode, createContext, createElement } from "react"; /** * react-native-web does not export its context. Never reset by a `View`: CSS * inheritance crosses it, so a Text below one still inherits. */ export const TextAncestorContext = createContext(false); interface TextAncestorScopeProps { children: ReactNode; } export function TextAncestorScope({ children, }: TextAncestorScopeProps): ReactNode { return createElement(TextAncestorContext, { value: true }, children); }