@arche-mc2/arche-controls
Version:
We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get
57 lines (56 loc) • 1.65 kB
TypeScript
import { ArcheIconName } from '../../../Common/theming/icons';
import { ReactNode } from 'react';
import { BaseControlProps } from '../_Common/BaseControl/BaseControl';
import { IntentType } from '../../../Common/theming/types';
export declare type Position = 'left' | 'right';
export declare type AlignMode = 'horizontal' | 'vertical';
export declare type DisplayMode = 'normal' | 'button' | 'large';
export interface IOption {
value: any;
text?: string | {
[key: string]: any;
};
iconName?: ArcheIconName;
name?: string;
checked?: boolean;
intent?: IntentType;
toggledElement?: Array<ReactNode> | ReactNode;
readonly?: boolean;
disabled?: boolean;
additionalData?: {
[key: string]: any;
};
}
export interface UpRadioStyledProps extends IOption {
className?: string;
gutter?: number;
tabIndex?: number;
onChange?: (e: any) => void;
}
export interface UpRadioState {
options?: Array<IOption>;
value?: any;
}
export interface UpRadioProps extends BaseControlProps<any> {
options: Array<IOption>;
position?: Position;
name: string;
value?: any;
alignMode?: AlignMode;
displayMode?: DisplayMode;
gutter?: number;
onChange?: (arg: any, event: any, error?: string) => void;
flexWrap?: boolean;
additionalData?: {
[key: string]: any;
};
nbItemsPerRow?: number;
className?: string;
}
export declare type RadioGroupProps = {
className?: string;
gutter?: number;
flexWrap?: boolean;
readonly?: boolean;
nbItemsPerRow?: number;
};