reactive-bulma 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,4 @@
1
1
  import React from 'react';
2
- interface ButtonProps {
3
- text?: string;
4
- }
2
+ import { ButtonProps } from '../../../interfaces/atomProps';
5
3
  declare const Button: React.FC<ButtonProps>;
6
4
  export default Button;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ColumnProps } from '../../../interfaces/atomProps';
3
+ declare const Column: React.FC<ColumnProps>;
4
+ export default Column;
@@ -0,0 +1,2 @@
1
+ export { default as Button } from './Button';
2
+ export { default as Column } from './Column';
@@ -1 +1,2 @@
1
- export * from './components';
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
- export { Button };
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