@kwiz/fluentui 1.0.60 → 1.0.61
Sign up to get free protection for your applications and to get access to all the features.
package/README.md
CHANGED
@@ -11,7 +11,7 @@ To successfully use these controls you should create a context:
|
|
11
11
|
|
12
12
|
```ts
|
13
13
|
const root = React.useRef<HTMLDivElement>(null);
|
14
|
-
const kwizFluentContext = useKWIZFluentContextProvider({
|
14
|
+
const { KWIZFluentContext, value: kwizFluentContext } = useKWIZFluentContextProvider({
|
15
15
|
ctx: {
|
16
16
|
buttonShape: "rounded"
|
17
17
|
},
|
@@ -1,7 +1,10 @@
|
|
1
|
-
import React
|
1
|
+
import React from "react";
|
2
2
|
import { iKWIZFluentContext } from "./context-const";
|
3
3
|
export type { iKWIZFluentContext } from "./context-const";
|
4
4
|
export declare function useKWIZFluentContextProvider(options: {
|
5
5
|
root?: React.MutableRefObject<HTMLDivElement>;
|
6
6
|
ctx?: iKWIZFluentContext;
|
7
|
-
}):
|
7
|
+
}): {
|
8
|
+
KWIZFluentContext: React.Context<iKWIZFluentContext>;
|
9
|
+
value: iKWIZFluentContext;
|
10
|
+
};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
1
|
import { makeStyles } from "@fluentui/react-components";
|
3
2
|
import { useEffect, useState } from "react";
|
4
3
|
import { KWIZFluentContext } from "./context-const";
|
@@ -20,6 +19,6 @@ export function useKWIZFluentContextProvider(options) {
|
|
20
19
|
// we need to set it into state so it will trigger a ui update
|
21
20
|
setKwizFluentContext(Object.assign(Object.assign({}, v), { mountNode: options.root.current }));
|
22
21
|
}, [options.root]);
|
23
|
-
return
|
22
|
+
return { KWIZFluentContext, value: kwizFluentContext };
|
24
23
|
}
|
25
24
|
//# sourceMappingURL=context-export.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-export.js","sourceRoot":"","sources":["../../src/helpers/context-export.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"context-export.js","sourceRoot":"","sources":["../../src/helpers/context-export.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAsB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGxE,MAAM,gBAAgB,GAAG,UAAU,CAAC;IAChC,IAAI,EAAE;QACF,KAAK,EAAE;YACH,cAAc,EAAE,MAAM;SACzB;KACJ;CACJ,CAAC,CAAA;AAEF,MAAM,UAAU,4BAA4B,CAAC,OAG5C;IACG,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;IACnC,IAAI,CAAC,GAAuB,OAAO,IAAI,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC;IACzD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAqB,CAAC,CAAC,CAAC;IAClF,SAAS,CAAC,GAAG,EAAE;;QACX,MAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,OAAO,0CAAE,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACjE,kEAAkE;QAClE,8DAA8D;QAC9D,oBAAoB,iCACb,CAAC,KACJ,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,IACjC,CAAC;IACP,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;AAC3D,CAAC"}
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { makeStyles } from "@fluentui/react-components";
|
2
|
-
import React, {
|
2
|
+
import React, { useEffect, useState } from "react";
|
3
3
|
import { iKWIZFluentContext, KWIZFluentContext } from "./context-const";
|
4
4
|
export type { iKWIZFluentContext } from "./context-const";
|
5
5
|
|
@@ -27,5 +27,5 @@ export function useKWIZFluentContextProvider(options: {
|
|
27
27
|
mountNode: options.root.current
|
28
28
|
});
|
29
29
|
}, [options.root]);
|
30
|
-
return
|
30
|
+
return { KWIZFluentContext, value: kwizFluentContext };
|
31
31
|
}
|