reactive-bulma 1.4.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +25 -6
- package/dist/cjs/index.js +9 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/{Button/Button.d.ts → atoms/Button/index.d.ts} +1 -3
- package/dist/cjs/types/components/atoms/Column/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/cjs/types/interfaces/atomProps.d.ts +10 -0
- package/dist/cjs/types/types/styleTypes.d.ts +2 -0
- package/dist/esm/index.js +9 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/{Button/Button.d.ts → atoms/Button/index.d.ts} +1 -3
- package/dist/esm/types/components/atoms/Column/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +2 -0
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/esm/types/interfaces/atomProps.d.ts +10 -0
- package/dist/esm/types/types/styleTypes.d.ts +2 -0
- package/dist/index.d.ts +15 -3
- package/package.json +4 -3
- package/dist/cjs/types/components/Button/index.d.ts +0 -1
- package/dist/cjs/types/components/index.d.ts +0 -2
- package/dist/esm/types/components/Button/index.d.ts +0 -1
- package/dist/esm/types/components/index.d.ts +0 -2
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
import '../node_modules/bulma/css/bulma.min.css';
|
2
|
+
export * from './components/atoms';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { columnOffsetType, columnSizeType } from '../types/styleTypes';
|
3
|
+
export interface ButtonProps {
|
4
|
+
text?: string;
|
5
|
+
}
|
6
|
+
export interface ColumnProps extends React.ComponentPropsWithoutRef<'section'> {
|
7
|
+
size?: columnSizeType;
|
8
|
+
offset?: columnOffsetType;
|
9
|
+
isNarrow?: boolean;
|
10
|
+
}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export type columnSizeType = 'is-three-quarters' | 'is-two-thirds' | 'is-half' | 'is-one-third' | 'is-one-quarter' | 'is-full' | 'is-four-fifths' | 'is-three-fifths' | 'is-two-fifths' | 'is-one-fifth' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8' | 'is-9' | 'is-10' | 'is-11' | 'is-12';
|
2
|
+
export type columnOffsetType = 'is-offset-1' | 'is-offset-2' | 'is-offset-3' | 'is-offset-4' | 'is-offset-5' | 'is-offset-6' | 'is-offset-7' | 'is-offset-8' | 'is-offset-9' | 'is-offset-10' | 'is-offset-11' | 'is-offset-12';
|
package/dist/esm/index.js
CHANGED
@@ -2838,7 +2838,14 @@ function requireReact_development () {
|
|
2838
2838
|
|
2839
2839
|
var React = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
|
2840
2840
|
|
2841
|
-
const Button = ({ text = '' }) => (React.createElement("button", { className: 'button' }, text));
|
2841
|
+
const Button = ({ text = '' }) => (React.createElement("button", { "data-testid": 'test-button', className: 'button' }, text));
|
2842
2842
|
|
2843
|
-
|
2843
|
+
const Column = ({ size = null, offset = null, isNarrow = false, children = null }) => {
|
2844
|
+
const classes = ['column', size, offset, isNarrow ? 'is-narrow' : null]
|
2845
|
+
.filter(_class => _class)
|
2846
|
+
.join(' ');
|
2847
|
+
return (React.createElement("section", { "data-testid": 'test-column', className: classes }, children));
|
2848
|
+
};
|
2849
|
+
|
2850
|
+
export { Button, Column };
|
2844
2851
|
//# sourceMappingURL=index.js.map
|