react-native-text-plus
Version:
react-native-text-plus
32 lines • 2.02 kB
TypeScript
import { type TextProps, type TextStyle } from 'react-native';
import { type LinearGradientProps } from 'react-native-linear-gradient';
import { type ReactNode } from 'react';
declare const textStylePick: readonly ["color", "fontFamily", "fontSize", "fontStyle", "fontWeight", "letterSpacing", "lineHeight", "textAlign", "textDecorationLine", "textDecorationStyle", "textDecorationColor", "textShadowColor", "textShadowOffset", "textShadowRadius", "textTransform", "userSelect", "textAlignVertical", "verticalAlign", "includeFontPadding", "fontVariant", "writingDirection"];
declare const textPropsPick: readonly ["allowFontScaling"];
declare const linearGradientPropsPick: readonly ["colors", "start", "end", "locations", "useAngle", "angleCenter", "angle"];
export type TextPlusProps = TextProps & Partial<Pick<LinearGradientProps, (typeof linearGradientPropsPick)[number]>> & Pick<TextStyle, (typeof textStylePick)[number]> & Pick<TextProps, (typeof textPropsPick)[number]>;
type ContextType = Pick<TextStyle, (typeof textStylePick)[number]> & Pick<TextProps, (typeof textPropsPick)[number]>;
export declare const TextContext: import("react").Context<ContextType>;
export declare const Provider: ({ children, value, }: {
children: ReactNode;
value: ContextType;
}) => import("react/jsx-runtime").JSX.Element;
export declare const TextContextProvider: ({ children, value, }: {
children: ReactNode;
value: ContextType;
}) => import("react/jsx-runtime").JSX.Element;
export declare const Context: import("react").Context<ContextType>;
export declare const Text: {
(props: TextPlusProps): import("react/jsx-runtime").JSX.Element;
Provider: ({ children, value, }: {
children: ReactNode;
value: ContextType;
}) => import("react/jsx-runtime").JSX.Element;
Context: import("react").Context<ContextType>;
};
declare const _default: typeof Text & {
Provider: typeof Provider;
Context: typeof TextContext;
};
export default _default;
//# sourceMappingURL=index.d.ts.map