@servicetitan/confirm 22.4.5 → 22.4.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/confirm",
3
- "version": "22.4.5",
3
+ "version": "22.4.6",
4
4
  "description": "",
5
5
  "homepage": "https://docs.st.dev/docs/frontend/confirm",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "react": "~17.0.2"
22
22
  },
23
23
  "peerDependencies": {
24
- "@servicetitan/design-system": "~11.8.0",
24
+ "@servicetitan/design-system": ">11.8.0",
25
25
  "react": "~17.0.2"
26
26
  },
27
27
  "dependencies": {
@@ -33,5 +33,5 @@
33
33
  "cli": {
34
34
  "webpack": false
35
35
  },
36
- "gitHead": "01a6292ee7c2166a6403492b8a26fef3a46e15a0"
36
+ "gitHead": "46d364e638c43a68644eb90b3ca48cd605bf2c1f"
37
37
  }
@@ -0,0 +1,34 @@
1
+ import { Fragment, FC } from 'react';
2
+ import { Text } from '@servicetitan/design-system';
3
+
4
+ import {
5
+ BasicExample,
6
+ HookExample,
7
+ ConfigurableExample,
8
+ ToggleableExample,
9
+ YesNoExample,
10
+ CustomExample,
11
+ } from '../dist/demo';
12
+
13
+ export default {
14
+ title: 'Confirm/Demos',
15
+ };
16
+
17
+ export const Basic = wrap('Default confirmation', BasicExample);
18
+ export const Hook = wrap('Hook usage', HookExample);
19
+ export const Configurable = wrap('Configurable default dialog', ConfigurableExample);
20
+ export const Toggleable = wrap('Toggleable confirmation', ToggleableExample);
21
+ export const YesNo = wrap('(Yes / No / Cancel) confrimation', YesNoExample);
22
+ export const Custom = wrap('Custom confirmation component', CustomExample);
23
+
24
+ function wrap(name: string, Component: FC) {
25
+ return () => (
26
+ <Fragment>
27
+ <Text size={4} className="m-b-half">
28
+ {name}
29
+ </Text>
30
+
31
+ <Component />
32
+ </Fragment>
33
+ );
34
+ }