reactive-bulma 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -2840,12 +2840,30 @@ function requireReact_development () {
2840
2840
 
2841
2841
  var React = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
2842
2842
 
2843
- const Button = ({ text = '' }) => (React.createElement("button", { "data-testid": 'test-button', className: 'button' }, text));
2843
+ const parseClasses = (_classes) => _classes.filter(_class => _class).join(' ');
2844
+
2845
+ const Button = ({ text = null, type = 'button', style = null, color = 'is-white', isLightColor = false, isInvertedColor = false, isOutlined = false, isRounded = false, isLoading = false, isDisabled = false, isStatic = false, size = null, onClick = null }) => {
2846
+ const buttonClasses = parseClasses([
2847
+ 'button',
2848
+ color,
2849
+ isLightColor ? 'is-light' : null,
2850
+ isInvertedColor ? 'is-inverted' : null,
2851
+ isOutlined ? 'is-outlined' : null,
2852
+ isRounded ? 'is-rounded' : null,
2853
+ isLoading ? 'is-loading' : null,
2854
+ isStatic ? 'is-static' : null,
2855
+ size
2856
+ ]);
2857
+ return (React.createElement("button", { "data-testid": 'test-button', type: type, className: buttonClasses, style: style !== null && style !== void 0 ? style : undefined, disabled: isDisabled !== null && isDisabled !== void 0 ? isDisabled : false, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined }, text));
2858
+ };
2844
2859
 
2845
2860
  const Column = ({ size = null, offset = null, isNarrow = false, children = null }) => {
2846
- const classes = ['column', size, offset, isNarrow ? 'is-narrow' : null]
2847
- .filter(_class => _class)
2848
- .join(' ');
2861
+ const classes = parseClasses([
2862
+ 'column',
2863
+ size,
2864
+ offset,
2865
+ isNarrow ? 'is-narrow' : null
2866
+ ]);
2849
2867
  return (React.createElement("section", { "data-testid": 'test-column', className: classes }, children));
2850
2868
  };
2851
2869