@@ -25,7 +25,7 @@ require("./Button.scss");
2525
2626var _jsxRuntime = require ( "react/jsx-runtime" ) ;
2727
28- var _excluded = [ "className" , "icon" , "label" , "tooltip" , "variant" ] ;
28+ var _excluded = [ "className" , "density" , " icon", "label" , "tooltip" , "variant" ] ;
2929
3030function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
3131
@@ -45,13 +45,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
4545
4646var Button = /*#__PURE__*/ ( 0 , _react . forwardRef ) ( function ( _ref , ref ) {
4747 var className = _ref . className ,
48+ density = _ref . density ,
4849 icon = _ref . icon ,
4950 label = _ref . label ,
5051 tooltip = _ref . tooltip ,
5152 variant = _ref . variant ,
5253 restProps = _objectWithoutProperties ( _ref , _excluded ) ;
5354
54- var buttonClassName = ( 0 , _classnames . default ) ( 'btn' , "btn-" . concat ( variant ) , className ) ;
55+ var buttonClassName = ( 0 , _classnames . default ) ( 'btn' , "btn-" . concat ( variant ) , "btn-" . concat ( density ) , className ) ;
5556 return /*#__PURE__*/ ( 0 , _jsxRuntime . jsx ) ( _Tooltip . default , {
5657 template : /*#__PURE__*/ ( 0 , _jsxRuntime . jsx ) ( _TextTooltipTemplate . default , {
5758 text : tooltip
@@ -68,12 +69,14 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
6869} ) ;
6970Button . defaultProps = {
7071 className : '' ,
72+ density : 'normal' ,
7173 label : 'Button' ,
7274 tooltip : '' ,
7375 variant : _constants . TERTIARY_BUTTON
7476} ;
7577Button . propTypes = {
7678 className : _propTypes . default . string ,
79+ density : _propTypes . default . oneOf ( [ 'dense' , 'normal' , 'medium' , 'chunky' ] ) ,
7780 icon : _propTypes . default . element ,
7881 label : _propTypes . default . oneOfType ( [ _propTypes . default . string , _propTypes . default . element ] ) ,
7982 tooltip : _propTypes . default . string ,
0 commit comments