UNPKG

amotify

Version:

UI Component for React,NextJS,esbuild

28 lines (27 loc) 1.22 kB
/// <reference types="react" /> import { Records } from 'jmini'; import { List } from './List'; declare namespace Segmented { type Tones = 'plain' | 'cloud' | 'cloud.theme' | 'cloud.mono' | 'border' | 'border.vivid' | 'bottomline'; type CoreInput = Segmented.Input & { __sys_segmented_type: Segmented.Tones; }; type Value<T = any> = T extends infer V ? V : string | number | boolean | Records | void | null; type Input<T = any> = List.Input<T>; namespace Methods { type Component = { <T = any>(p: Input<T>): React.JSX.Element; }; type FNs = { Cloud: <T = any>(p: Input<Value<T>>) => React.JSX.Element; CloudTheme: <T = any>(p: Input<Value<T>>) => React.JSX.Element; CloudMono: <T = any>(p: Input<Value<T>>) => React.JSX.Element; Border: <T = any>(p: Input<Value<T>>) => React.JSX.Element; BorderVivid: <T = any>(p: Input<Value<T>>) => React.JSX.Element; Bottomline: <T = any>(p: Input<Value<T>>) => React.JSX.Element; }; } type Methods = Methods.Component & Methods.FNs; } declare const Segmented: Segmented.Methods; export { Segmented, Segmented as default };