@wix/site-service-lightbox 1.0.3 → 1.0.4
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.
|
@@ -123,6 +123,26 @@ export interface ILightboxService {
|
|
|
123
123
|
* )
|
|
124
124
|
* }
|
|
125
125
|
* ```
|
|
126
|
+
*
|
|
127
|
+
* @example Close a popup after 10 seconds
|
|
128
|
+
* ```tsx
|
|
129
|
+
* import { useEffect } from 'react'
|
|
130
|
+
* import { useService } from '@wix/services-manager-react'
|
|
131
|
+
* import { LightboxDefinition } from '@wix/site-service-lightbox/definition'
|
|
132
|
+
*
|
|
133
|
+
* function ShippingPromo() {
|
|
134
|
+
* const lightboxService = useService(LightboxDefinition)
|
|
135
|
+
*
|
|
136
|
+
* useEffect(() => {
|
|
137
|
+
* const timer = setTimeout(() => lightboxService.close(), 10000)
|
|
138
|
+
*
|
|
139
|
+
* // Clear the timer if the component unmounts first.
|
|
140
|
+
* return () => clearTimeout(timer)
|
|
141
|
+
* }, [lightboxService])
|
|
142
|
+
*
|
|
143
|
+
* return <p>Free shipping on all orders this week.</p>
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
126
146
|
*/
|
|
127
147
|
close(): void;
|
|
128
148
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AAiM5C,QAAA,kBAAkB,GAAG,IAAA,oCAAa,EAA2C,4BAA4B,CAAC,CAAA"}
|
|
@@ -123,6 +123,26 @@ export interface ILightboxService {
|
|
|
123
123
|
* )
|
|
124
124
|
* }
|
|
125
125
|
* ```
|
|
126
|
+
*
|
|
127
|
+
* @example Close a popup after 10 seconds
|
|
128
|
+
* ```tsx
|
|
129
|
+
* import { useEffect } from 'react'
|
|
130
|
+
* import { useService } from '@wix/services-manager-react'
|
|
131
|
+
* import { LightboxDefinition } from '@wix/site-service-lightbox/definition'
|
|
132
|
+
*
|
|
133
|
+
* function ShippingPromo() {
|
|
134
|
+
* const lightboxService = useService(LightboxDefinition)
|
|
135
|
+
*
|
|
136
|
+
* useEffect(() => {
|
|
137
|
+
* const timer = setTimeout(() => lightboxService.close(), 10000)
|
|
138
|
+
*
|
|
139
|
+
* // Clear the timer if the component unmounts first.
|
|
140
|
+
* return () => clearTimeout(timer)
|
|
141
|
+
* }, [lightboxService])
|
|
142
|
+
*
|
|
143
|
+
* return <p>Free shipping on all orders this week.</p>
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
126
146
|
*/
|
|
127
147
|
close(): void;
|
|
128
148
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAiMzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAA2C,4BAA4B,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/site-service-lightbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
"falconPackageHash": "
|
|
80
|
+
"falconPackageHash": "199bdec5995c3f1e1d582da1111ff32fbabbf9bbc47a13c567dd1593"
|
|
81
81
|
}
|
package/src/definition/index.ts
CHANGED
|
@@ -128,6 +128,26 @@ export interface ILightboxService {
|
|
|
128
128
|
* )
|
|
129
129
|
* }
|
|
130
130
|
* ```
|
|
131
|
+
*
|
|
132
|
+
* @example Close a popup after 10 seconds
|
|
133
|
+
* ```tsx
|
|
134
|
+
* import { useEffect } from 'react'
|
|
135
|
+
* import { useService } from '@wix/services-manager-react'
|
|
136
|
+
* import { LightboxDefinition } from '@wix/site-service-lightbox/definition'
|
|
137
|
+
*
|
|
138
|
+
* function ShippingPromo() {
|
|
139
|
+
* const lightboxService = useService(LightboxDefinition)
|
|
140
|
+
*
|
|
141
|
+
* useEffect(() => {
|
|
142
|
+
* const timer = setTimeout(() => lightboxService.close(), 10000)
|
|
143
|
+
*
|
|
144
|
+
* // Clear the timer if the component unmounts first.
|
|
145
|
+
* return () => clearTimeout(timer)
|
|
146
|
+
* }, [lightboxService])
|
|
147
|
+
*
|
|
148
|
+
* return <p>Free shipping on all orders this week.</p>
|
|
149
|
+
* }
|
|
150
|
+
* ```
|
|
131
151
|
*/
|
|
132
152
|
close(): void
|
|
133
153
|
/**
|