UNPKG

@wix/design-system

Version:

@wix/design-system

17 lines 1.11 kB
import React from 'react'; import { st, classes, cssStates } from '../VerticalTabsItem.st.css.js'; import { Affix } from './Affix'; import { DATA_HOOKS } from '../VerticalTabsItem.constants'; import TextButton from '../../TextButton'; import { SIZE } from '../../VerticalTabs/VerticalTabs.constants'; const ActionItem = ({ children, dataHook, prefixIcon, suffixIcon, size, baseSkin, }) => (React.createElement("div", { className: st(classes.root, cssStates({ size, baseSkin, suffixIcon: !!suffixIcon, prefixIcon: !!prefixIcon, })), "data-hook": dataHook }, React.createElement(Affix, { dataHook: DATA_HOOKS.ITEM_PREFIX_ICON, size: size, className: st(classes.prefixIcon, { action: true }) }, prefixIcon), React.createElement(TextButton, { weight: "thin", className: classes.textButton, size: size === SIZE.TINY ? SIZE.SMALL : size, dataHook: DATA_HOOKS.ITEM_TEXT }, children), React.createElement(Affix, { dataHook: DATA_HOOKS.ITEM_SUFFIX_ICON, size: size, className: classes.suffixIcon }, suffixIcon))); export { ActionItem }; //# sourceMappingURL=ActionItem.js.map