UNPKG

strivui

Version:

**StrivUI** is a modern, utility-first UI component library designed for building fast, beautiful, and accessible interfaces in **React** using both **TypeScript** and **JavaScript**.

75 lines (74 loc) 3.48 kB
import React, { ReactNode, HTMLAttributes, UIEventHandler, CSSProperties, ImgHTMLAttributes, MouseEventHandler } from "react"; type PressableProps = HTMLAttributes<HTMLDivElement> & { onPress?: MouseEventHandler<HTMLDivElement>; children?: ReactNode; style?: CSSProperties; }; declare const Pressable: ({ children, onPress, style, className, ...props }: PressableProps) => import("react/jsx-runtime").JSX.Element; type ScrollViewProps = HTMLAttributes<HTMLDivElement> & { children?: ReactNode; horizontal?: boolean; onScroll?: UIEventHandler<HTMLDivElement>; style?: CSSProperties; }; declare const ScrollView: ({ children, horizontal, style, onScroll, className, ...props }: ScrollViewProps) => import("react/jsx-runtime").JSX.Element; type ImageProps = ImgHTMLAttributes<HTMLImageElement>; declare const Image: (props: ImageProps) => import("react/jsx-runtime").JSX.Element; declare const ActivityIndicator: () => import("react/jsx-runtime").JSX.Element; type TouchableOpacityProps = HTMLAttributes<HTMLDivElement> & { onPress?: MouseEventHandler<HTMLDivElement>; children?: ReactNode; }; declare const TouchableOpacity: ({ children, onPress, className, ...props }: TouchableOpacityProps) => import("react/jsx-runtime").JSX.Element; type FlatListProps<T> = { data: T[]; renderItem: (item: T, index: number) => React.ReactNode; keyExtractor?: (item: T, index: number) => string; }; declare function FlatList<T>({ data, renderItem, keyExtractor }: FlatListProps<T>): import("react/jsx-runtime").JSX.Element; type ImageBackgroundProps = HTMLAttributes<HTMLDivElement> & { source: string; resizeMode?: "cover" | "contain" | "stretch" | "center"; children?: ReactNode; style?: CSSProperties; }; declare const ImageBackground: ({ source, resizeMode, children, style, className, ...props }: ImageBackgroundProps) => import("react/jsx-runtime").JSX.Element; type ModalProps = { children: ReactNode; open: boolean; onClose?: () => void; }; declare const Modal: ({ open, onClose, children }: ModalProps) => import("react/jsx-runtime").JSX.Element | null; type DialogProps = { title: string; description: string; confirmText?: string; cancelText?: string; onConfirm: () => void; onCancel: () => void; open: boolean; }; declare const Dialog: ({ open, title, description, confirmText, cancelText, onConfirm, onCancel, }: DialogProps) => import("react/jsx-runtime").JSX.Element | null; type ToastContextType = { showToast: (msg: string) => void; }; declare const useToast: () => ToastContextType; declare const ToastProvider: ({ children }: { children: ReactNode; }) => import("react/jsx-runtime").JSX.Element; type SectionListProps<T> = { sections: { title: string; data: T[]; }[]; renderItem: (item: T, index: number) => React.ReactNode; renderSectionHeader?: (title: string, index: number) => React.ReactNode; }; declare function SectionList<T>({ sections, renderItem, renderSectionHeader, }: SectionListProps<T>): import("react/jsx-runtime").JSX.Element; type OverlayProps = { visible: boolean; onClick?: () => void; children?: ReactNode; }; declare const Overlay: ({ visible, onClick, children }: OverlayProps) => import("react/jsx-runtime").JSX.Element | null; export { FlatList, TouchableOpacity, Pressable, ScrollView, ActivityIndicator, Image, ImageBackground, Modal, Dialog, SectionList, Overlay, ToastProvider, useToast, };