wix-style-react
Version:
wix-style-react
20 lines • 965 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
import Text from '../../Text';
import { dataHooks } from '../constants';
import { classes } from './FunnelLabel.st.css';
export const FunnelLabel = ({ value, label, displayValue }) => {
const numberToPresent = displayValue ? displayValue : value;
return (React.createElement("div", { className: classes.root },
React.createElement(Text, { dataHook: dataHooks.labelText, size: "tiny", weight: "normal", secondary: true, ellipsis: true, tooltipProps: { size: 'small' } }, label),
React.createElement(Text, { dataHook: dataHooks.labelValue, size: "medium", weight: "bold", ellipsis: true }, numberToPresent)));
};
FunnelLabel.propTypes = {
/** Label's value */
value: PropTypes.number,
/** Label's content */
label: PropTypes.string.isRequired,
/** Label's value send by the user */
displayValue: PropTypes.string,
};
//# sourceMappingURL=FunnelLabel.js.map