@pushwoosh/dumb-components 0.0.18 → 0.0.19

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.
@@ -0,0 +1,3 @@
1
+ import { type FC } from 'react';
2
+ import { type FieldBoxProps } from './FieldBox.types';
3
+ export declare const FieldBox: FC<FieldBoxProps>;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { Color, Spacing } from '@pushwoosh/kit-constants';
3
+ import { Vertical } from '@pushwoosh/kit-helpers';
4
+ import { Text } from '@pushwoosh/kit-typography';
5
+ export const FieldBox = ({
6
+ title,
7
+ description,
8
+ error,
9
+ children
10
+ }) => {
11
+ return React.createElement(Vertical, {
12
+ "$gap": Spacing.S1
13
+ }, React.createElement(Text, {
14
+ "$variant": "h5"
15
+ }, title), children, description && React.createElement(Text, {
16
+ "$variant": "h5",
17
+ "$color": Color.LOCKED
18
+ }, description), error && React.createElement(Text, {
19
+ "$variant": "h5",
20
+ "$color": Color.DANGER
21
+ }, error));
22
+ };
@@ -0,0 +1,6 @@
1
+ import { type PropsWithChildren, type ReactNode } from 'react';
2
+ export type FieldBoxProps = PropsWithChildren<{
3
+ title: ReactNode;
4
+ description?: ReactNode;
5
+ error?: ReactNode;
6
+ }>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { type FieldBoxProps } from './FieldBox.types';
2
+ export { FieldBox } from './FieldBox';
@@ -0,0 +1 @@
1
+ export { FieldBox } from './FieldBox';
package/index.d.ts CHANGED
@@ -5,4 +5,5 @@ export { EmailTemplatePreview, NoEmailTemplatePreview, } from './EmailTemplatePr
5
5
  export { PushPreview } from './PushPreview';
6
6
  export { ExportResult } from './ExportResult';
7
7
  export { NativeInput, NativeTextarea, NativeSelect, } from './native';
8
+ export { FieldBox } from './FieldBox';
8
9
  export { NumberPicker } from './NumberPicker';
package/index.js CHANGED
@@ -5,4 +5,5 @@ export { EmailTemplatePreview, NoEmailTemplatePreview } from './EmailTemplatePre
5
5
  export { PushPreview } from './PushPreview';
6
6
  export { ExportResult } from './ExportResult';
7
7
  export { NativeInput, NativeTextarea, NativeSelect } from './native';
8
+ export { FieldBox } from './FieldBox';
8
9
  export { NumberPicker } from './NumberPicker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",