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 +22 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/functions/persers.d.ts +1 -0
- package/dist/cjs/types/functions/tests/parsers.test.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +13 -2
- package/dist/cjs/types/types/domTypes.d.ts +1 -0
- package/dist/cjs/types/types/styleTypes.d.ts +2 -0
- package/dist/esm/index.js +22 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/functions/persers.d.ts +1 -0
- package/dist/esm/types/functions/tests/parsers.test.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +13 -2
- package/dist/esm/types/types/domTypes.d.ts +1 -0
- package/dist/esm/types/types/styleTypes.d.ts +2 -0
- package/dist/index.d.ts +14 -1
- package/package.json +1 -1
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
|
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 = [
|
2847
|
-
|
2848
|
-
|
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
|
|