UNPKG

swiftui-react-native

Version:

A React Native component library inspired by SwiftUI

70 lines (69 loc) 4.96 kB
import { type Color as ColorType } from '../utils/colors'; import { ButtonProps } from '../views/Button/types'; import { ColorPickerProps } from '../views/ColorPicker/types'; import { DatePickerProps } from '../views/DatePicker/types'; import { HStackProps } from '../views/HStack/types'; import { LabelProps } from '../views/Label/types'; import { MenuProps } from '../views/Menu/types'; import { PickerProps } from '../views/Picker/types'; import { ProgressProps } from '../views/ProgressView/types'; import { SectionProps } from '../views/Section/types'; import { ShapeCornerRadii, ShapeCornerRadius } from '../views/Shape/types'; import { SliderProps } from '../views/Slider/types'; import { StepperProps } from '../views/Stepper/types'; import { TextFieldProps } from '../views/TextField/types'; import { ToggleProps } from '../views/Toggle/types'; import { VStackProps } from '../views/VStack/types'; import { ZStackProps } from '../views/ZStack/types'; import { ElementWithModifiers } from './createSwiftUIComponent'; declare const Text: (text: string) => ElementWithModifiers; declare const Button: (props: Pick<ButtonProps, 'title' | 'action' | 'role' | 'systemImage'>, ...children: ElementWithModifiers[]) => ElementWithModifiers; declare const Image: ({ systemName }: { systemName: string; }) => ElementWithModifiers; declare const VStack: (propsOrFirstChild: Pick<VStackProps, 'alignment' | 'spacing'> | ElementWithModifiers, ...children: ElementWithModifiers[]) => ElementWithModifiers; declare const ZStack: (propsOrFirstChild: Pick<ZStackProps, 'alignment'> | ElementWithModifiers, ...children: ElementWithModifiers[]) => ElementWithModifiers; declare const HStack: (propsOrFirstChild: Pick<HStackProps, 'alignment' | 'spacing'> | ElementWithModifiers, ...children: ElementWithModifiers[]) => ElementWithModifiers; declare const Toggle: (props: Pick<ToggleProps, 'title' | 'isOn' | 'onChange'>) => ElementWithModifiers; declare const Stepper: (props: Pick<StepperProps, 'value' | 'range' | 'step' | 'onChange'>) => ElementWithModifiers; declare const Spacer: () => ElementWithModifiers; declare const Label: (props: Pick<LabelProps, 'title' | 'systemImage'>) => ElementWithModifiers; declare const List: (...children: ElementWithModifiers[]) => ElementWithModifiers; declare const Color: ((color: ColorType) => ElementWithModifiers) & { red: ElementWithModifiers; green: ElementWithModifiers; blue: ElementWithModifiers; black: ElementWithModifiers; white: ElementWithModifiers; gray: ElementWithModifiers; primary: ElementWithModifiers; secondary: ElementWithModifiers; accentColor: ElementWithModifiers; clear: ElementWithModifiers; cyan: ElementWithModifiers; indigo: ElementWithModifiers; mint: ElementWithModifiers; orange: ElementWithModifiers; pink: ElementWithModifiers; purple: ElementWithModifiers; teal: ElementWithModifiers; yellow: ElementWithModifiers; }; declare const ColorPicker: (props: Pick<ColorPickerProps, 'title' | 'selection' | 'supportsOpacity' | 'onChange'>) => ElementWithModifiers; declare const DatePicker: (props: Pick<DatePickerProps, 'title' | 'selection' | 'displayedComponents' | 'onChange'>) => ElementWithModifiers; declare const Picker: (props: Pick<PickerProps, 'selection' | 'onChange'>) => ElementWithModifiers; declare const Slider: (props: Pick<SliderProps, 'value' | 'range' | 'step' | 'onChange'>) => ElementWithModifiers; declare const TextField: (props: Pick<TextFieldProps, 'text' | 'placeholder' | 'onChange'>) => ElementWithModifiers; declare const SecureField: (props: Pick<TextFieldProps, 'text' | 'placeholder' | 'onChange'>) => ElementWithModifiers; declare const TextEditor: (props: Pick<TextFieldProps, 'text' | 'placeholder' | 'onChange'>) => ElementWithModifiers; declare const ProgressView: (props: Pick<ProgressProps, 'value' | 'total'>) => ElementWithModifiers; declare const Circle: () => ElementWithModifiers; declare const Capsule: () => ElementWithModifiers; declare const Ellipse: () => ElementWithModifiers; declare const RoundedRectangle: (props: ShapeCornerRadius) => ElementWithModifiers; declare const Rectangle: () => ElementWithModifiers; declare const UnevenRoundedRectangle: (props: ShapeCornerRadii) => ElementWithModifiers; declare const Section: (propsOrFirstChild: Pick<SectionProps, 'header' | 'footer'> | ElementWithModifiers, ...children: ElementWithModifiers[]) => ElementWithModifiers; declare const Divider: () => ElementWithModifiers; declare const Menu: (props: Pick<MenuProps, 'title' | 'systemImage' | 'primaryAction'>, ...children: ElementWithModifiers[]) => ElementWithModifiers; export { Button, Capsule, Circle, Color, ColorPicker, DatePicker, Divider, Ellipse, HStack, Image, Label, List, Menu, Picker, ProgressView, Rectangle, RoundedRectangle, Section, SecureField, Slider, Spacer, Stepper, Text, TextEditor, TextField, Toggle, UnevenRoundedRectangle, VStack, ZStack, };