Skip to content

Commit 493b88a

Browse files
author
sw-yx
committed
export context
1 parent 327113d commit 493b88a

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

.size-snapshot.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.cjs.development.js": {
3-
"bundled": 8689,
4-
"minified": 3490,
5-
"gzipped": 1344
3+
"bundled": 8887,
4+
"minified": 3642,
5+
"gzipped": 1373
66
},
77
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.cjs.production.js": {
8-
"bundled": 8689,
9-
"minified": 3490,
10-
"gzipped": 1344
8+
"bundled": 8887,
9+
"minified": 3642,
10+
"gzipped": 1373
1111
},
1212
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.umd.development.js": {
13-
"bundled": 9595,
14-
"minified": 3337,
15-
"gzipped": 1362
13+
"bundled": 9799,
14+
"minified": 3375,
15+
"gzipped": 1376
1616
},
1717
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.umd.production.js": {
18-
"bundled": 9595,
19-
"minified": 3337,
20-
"gzipped": 1362
18+
"bundled": 9799,
19+
"minified": 3375,
20+
"gzipped": 1376
2121
},
2222
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.es.production.js": {
23-
"bundled": 8500,
24-
"minified": 3341,
25-
"gzipped": 1290,
23+
"bundled": 8683,
24+
"minified": 3480,
25+
"gzipped": 1319,
2626
"treeshaked": {
2727
"rollup": {
2828
"code": 129,

src/index.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from "@reach/dialog"
77
import VisuallyHidden from "@reach/visually-hidden"
88

9-
import { Widget } from "./app"
9+
import { Widget, NetlifyIdentityContext } from "./app"
1010
type ModalProps = {
1111
/** URL of your Netlify Instance with Identity enabled e.g. https://netlify-gotrue-in-react.netlify.com */
1212
netlifyInstance: string
@@ -15,7 +15,8 @@ type ModalProps = {
1515
/** modal will call this function to set the state of showDialog to false */
1616
onCloseDialog: () => void
1717
}
18-
export function Modal({ showDialog, onCloseDialog, netlifyInstance }: ModalProps) {
18+
export const IdentityContext = NetlifyIdentityContext
19+
export function IdentityModal({ showDialog, onCloseDialog, netlifyInstance }: ModalProps) {
1920
if (!netlifyInstance) {
2021
// just a safety check in case a JS user tries to skip this
2122
if (!validateUrl(netlifyInstance))

0 commit comments

Comments
 (0)