@wix/design-system
Version:
@wix/design-system
25 lines • 1.27 kB
JavaScript
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import Button from '../Button';
import { st, classes } from './SelectorButton.st.css.js';
import { SIZES } from './SelectorButton.constants';
const SelectorButton = forwardRef(({ dataHook, onClick, children, ellipsis = false, showTooltip, tooltipProps, size = SIZES.MEDIUM, suffixIcon, disabled = false, fullWidth = false, }, ref) => {
return (React.createElement(Button, { ref: ref, as: "button", dataHook: dataHook, className: st(classes.root, { size, disabled }), onClick: onClick, suffixIcon: suffixIcon, ellipsis: ellipsis, showTooltip: showTooltip, tooltipProps: tooltipProps, disabled: disabled, fullWidth: fullWidth }, children));
});
SelectorButton.displayName = 'SelectorButton';
SelectorButton.propTypes = {
dataHook: PropTypes.string,
onClick: PropTypes.func,
// @ts-expect-error
children: PropTypes.node,
ellipsis: PropTypes.bool,
showTooltip: PropTypes.bool,
tooltipProps: PropTypes.object,
size: PropTypes.oneOf(['small', 'medium', 'large']),
// @ts-expect-error
suffixIcon: PropTypes.node,
disabled: PropTypes.bool,
fullWidth: PropTypes.bool,
};
export default SelectorButton;
//# sourceMappingURL=SelectorButton.js.map