UNPKG

@activecollab/components

Version:

ActiveCollab Components

34 lines 1.1 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import React, { forwardRef } from "react"; import { StyledValueButton, StyledValueButtonLabel, StyledValueButtonValue } from "./Styles"; export const ValueButton = /*#__PURE__*/forwardRef((_ref, ref) => { let { active = false, alwaysShowIcon = false, icon, label, value, ...args } = _ref; return /*#__PURE__*/React.createElement(StyledValueButton, _extends({ className: "c-value-button" }, args, { ref: ref, variant: "text gray", $active: active }), icon && alwaysShowIcon ? /*#__PURE__*/React.cloneElement(icon, { style: { display: "inline-block" } }) : null, label ? /*#__PURE__*/React.createElement(StyledValueButtonLabel, { color: "secondary", weight: "medium", className: "c-value-button__label" }, label, ":") : null, /*#__PURE__*/React.createElement(StyledValueButtonValue, { color: "secondary", weight: "medium", className: "c-value-button__value" }, value)); }); ValueButton.displayName = "ValueButton"; //# sourceMappingURL=ValueButton.js.map