mochi-ui
Version:
Mochi UI is a React component library that helps you build aweomse production ready UI components with a soft UI design.
136 lines (125 loc) • 3.34 kB
TypeScript
import React from 'react';
type Props$8 = {
domName?: string;
value?: string;
name?: string;
placeholder?: string;
error?: string;
touched?: boolean;
setTouched?: () => void;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
disabled?: boolean;
} & ({
type: 'text' | 'number' | 'password' | 'email' | 'tel' | 'search' | 'week';
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
} | {
type?: 'textarea';
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
});
declare const Input: (props: Props$8) => React.JSX.Element;
type Props$7 = {
domName: string;
value: Date;
onChange: (date: Date) => void;
name: string;
error: string;
date: boolean;
time: boolean;
endYear: number;
startYear: number;
touched?: boolean;
setTouched?: () => void;
disabled: boolean;
};
declare const DatePicker: (props?: Props$7) => React.JSX.Element;
type Props$6 = {
domName?: string;
name?: string;
error?: string;
value: Date;
onChange: (date: Date) => void;
touched?: boolean;
setTouched?: () => void;
disabled?: boolean;
};
declare const TimePicker: (props: Props$6) => React.JSX.Element;
type Props$5 = {
value: string;
name: string;
domName: string;
values: {
key: string;
label: string;
}[];
onChange: (item: string) => void;
touched?: boolean;
setTouched: () => void;
error: string;
defaultValue: string;
unSelectable?: boolean;
disabled: boolean;
show: boolean;
};
declare const DropDown: (props: Props$5) => React.JSX.Element;
type Props$4 = {
domName?: string;
value?: boolean;
name?: string;
onChange?: () => void;
disabled?: boolean;
};
declare const CheckBox$1: (props: Props$4) => React.JSX.Element;
type Props$3 = {
domName: string;
values: {
key: string;
label: string;
disabled?: boolean;
}[];
name: string;
onChange: (keys: string[]) => void;
containerClassName?: string;
value: string[];
touched?: boolean;
error?: string;
setTouched?: () => void;
};
declare const CheckBoxGroup: (props: Props$3) => React.JSX.Element;
type Props$2 = {
domName: string;
value: boolean;
name: string;
onChange?: () => void;
disabled: boolean;
};
declare const CheckBox: (props: Props$2) => React.JSX.Element;
type Props$1 = {
domName: string;
values: {
key: string;
label: string;
disabled?: boolean;
}[];
name: string;
onChange: (key: string) => void;
containerClassName?: string;
value: string;
touched?: boolean;
error?: string;
setTouched?: () => void;
};
declare const RadioGroup: (props: Props$1) => React.JSX.Element;
type Props = {
title?: string;
icon?: any;
iconRight?: any;
onClick?: (() => Promise<any>) | (() => void);
fullWidth?: boolean;
size?: 'large' | 'medium' | 'small' | 'icon';
color?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning';
shaded?: boolean;
disabled?: boolean;
margin?: boolean;
};
declare const Button: (props: Props) => React.JSX.Element;
export { Button, CheckBox$1 as CheckBox, CheckBoxGroup, DatePicker, DropDown, Input, CheckBox as Radio, RadioGroup, TimePicker };