Sha256: 52d5a0dab30f34a8f255bd3126eba5c1b6d25d648007d28597a180e61b4d8040
Contents?: true
Size: 1.85 KB
Versions: 47
Compression:
Stored size: 1.85 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { Body, SelectableCard, SelectableIcon } from '../' import { buildAriaProps, buildCss, buildDataProps, } from '../utilities/props' type SelectableCardIconProps = { aria?: Object, checked?: Boolean, checkmark: Boolean, className?: String, dark?: Boolean, data?: Object, disabled?: Boolean, icon?: String, inputId?: String, multi?: Boolean, name?: String, titleText?: String, bodyText?: String, value?: String, onChange?: (e) => void, } const SelectableCardIcon = ({ aria = {}, checkmark = false, checked = false, className, dark = false, data = {}, disabled = false, icon, inputId, multi = true, name, titleText, bodyText, value, onChange, }: SelectableCardIconProps) => { const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const css = buildCss({ 'pb_selectable_card_icon_kit': true, 'checked': checked, 'dark': dark, 'disabled': disabled, 'enabled': !disabled, }) return ( <div {...ariaProps} {...dataProps} className={classnames(css, className)} > <SelectableCard checked={checked} dark={dark} disabled={disabled} icon={checkmark} inputId={inputId} multi={multi} name={name} onChange={onChange} value={value} > { <> <SelectableIcon dark={dark} icon={icon} inputs="disabled" size="2x" text={titleText} /> <Body color="light" dark={dark} text={bodyText} /> </> } </SelectableCard> </div> ) } export default SelectableCardIcon
Version data entries
47 entries across 47 versions & 1 rubygems