@vrobots/storybook 0.1.72 → 0.1.73

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.
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vrobots/storybook",
3
3
  "private": false,
4
- "version": "0.1.72",
4
+ "version": "0.1.73",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface IVerifyActionProps {
3
+ isOpen: boolean;
4
+ heading: string;
5
+ subheading?: string;
6
+ onCancel: () => void;
7
+ onProceed: () => void;
8
+ }
9
+ export declare const VerifyAction: React.FC<IVerifyActionProps>;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Dialog, Portal, Text } from '@chakra-ui/react';
3
+ export const VerifyAction = ({ isOpen, heading, subheading, onCancel, onProceed }) => {
4
+ return (_jsx(Dialog.Root, { open: isOpen, onOpenChange: onCancel, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { children: [_jsx(Dialog.Header, { mb: 0, children: _jsx(Dialog.Title, { mb: 0, children: heading }) }), _jsx(Text, { ml: 6, children: subheading }), _jsx(Dialog.Body, {}), _jsxs(Dialog.Footer, { children: [_jsx(Dialog.ActionTrigger, { asChild: true, children: _jsx(Button, { variant: 'subtle', children: "Close" }) }), _jsx(Button, { ml: 1, onClick: onProceed, colorPalette: 'red', children: "Proceed" })] })] }) })] }) }));
5
+ };
@@ -14,6 +14,7 @@ export * from './Page';
14
14
  export * from './Section';
15
15
  export * from './Sidebar';
16
16
  export * from './Timeline';
17
+ export * from './VerifyAction';
17
18
  export * from './form/Login';
18
19
  export * from './form/SecondFactorAuth';
19
20
  export * from './form/FileUploader';
@@ -14,6 +14,7 @@ export * from './Page';
14
14
  export * from './Section';
15
15
  export * from './Sidebar';
16
16
  export * from './Timeline';
17
+ export * from './VerifyAction';
17
18
  export * from './form/Login';
18
19
  export * from './form/SecondFactorAuth';
19
20
  export * from './form/FileUploader';
@@ -0,0 +1,12 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import("react").FC<import("../components").IVerifyActionProps>;
5
+ tags: string[];
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Component: Story;
@@ -0,0 +1,19 @@
1
+ import { VerifyAction } from '../components';
2
+ const meta = {
3
+ title: 'Feedback/VerifyAction',
4
+ component: VerifyAction,
5
+ tags: ['autodocs'],
6
+ parameters: {
7
+ layout: 'fullscreen',
8
+ },
9
+ };
10
+ export default meta;
11
+ export const Component = {
12
+ args: {
13
+ isOpen: true,
14
+ heading: 'Are you sure?',
15
+ subheading: `This action can't be undone!`,
16
+ onCancel: () => console.log('close dialog'),
17
+ onProceed: () => console.log('proceed')
18
+ }
19
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vrobots/storybook",
3
3
  "private": false,
4
- "version": "0.1.72",
4
+ "version": "0.1.73",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",