jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
49 lines (48 loc) • 1.25 kB
TypeScript
/**
* @file index.tsx
*
* @fileoverview An boxed component that the user can select.
*/
import React from 'react';
export interface BoxSelectableProps {
/**
* For a controlled version use this to provide the value if its selected or not.
*/
selected?: boolean;
/**
* The icon to render inside the box.
*
* @default null
*/
icon?: React.ReactNode;
/**
* The title for the icon inside the box.
*
* @default null
*/
iconTitle?: string;
/**
* The style for the box.
*
* @default primary
*/
color?: 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning';
/**
* Handler to be called when clicking.
*
* @default null
*/
onClick?: () => void;
/**
* Text to render inside the box.
*
* @default null
*/
children: React.ReactNode;
}
/**
* A selectable box can be used for multi selection steps or pages like inside an onboarding wizard. Used
* for the same functionality as checkboxes but in a more stylistic way.
*/
export declare const BoxSelectable: ({ selected, onClick, icon, iconTitle, color, children }: BoxSelectableProps) => JSX.Element;
export default BoxSelectable;