Skip to content

Commit 684cf52

Browse files
committed
Inserting dispatch in events
1 parent 323ee2e commit 684cf52

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ yarn install && yarn start
4949

5050
Raw component props (before transform):
5151

52-
| Prop | Type | Description |
53-
| -------- | ---- | -------------- |
54-
| onChange | func | Call in change |
55-
| onError | func | Call in error |
52+
| Prop | Type | Description |
53+
| ------ | ---- | -------------- |
54+
| change | func | Call in change |
55+
| error | func | Call in error |
5656

5757
## Slot Properties
5858

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"sirv-cli": "^0.4.4",
15-
"svelte-fullscreen": "^0.2.1"
15+
"svelte-fullscreen": "^0.2.2"
1616
},
1717
"scripts": {
1818
"build": "rollup -c",

example/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,10 +1458,10 @@ supports-color@^6.1.0:
14581458
dependencies:
14591459
has-flag "^3.0.0"
14601460

1461-
svelte-fullscreen@^0.2.1:
1462-
version "0.2.1"
1463-
resolved "https://registry.yarnpkg.com/svelte-fullscreen/-/svelte-fullscreen-0.2.1.tgz#6cff6558f6d2cdc6d4086eb91abc1470d6b44721"
1464-
integrity sha512-jYBrDKW5mIjEtnlB7/Rk/eUCBs8mM77WH9v2xZFGqZ2nJHAz0KNyp2f7O/krxb6ioMb1URzgxce8qDMB+WFNJg==
1461+
svelte-fullscreen@^0.2.2:
1462+
version "0.2.2"
1463+
resolved "https://registry.yarnpkg.com/svelte-fullscreen/-/svelte-fullscreen-0.2.2.tgz#91b3b569742ee615329fd3ba54b831b37c46bef3"
1464+
integrity sha512-FvjaOllwkDpSERrrda0iy8avAJC7Mli3dHrxKeUvirm7hIvDgesqqJJMg9MijCle8x+PbCP/FC5FWEzdgYgZBg==
14651465
dependencies:
14661466
screenfull "^5.0.0"
14671467

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-fullscreen",
3-
"version": "0.2.2",
3+
"version": "0.3.0",
44
"description": "Component that performs fullscreen in DOM Elements",
55
"repository": "https://github.com/andrelmlins/svelte-fullscreen",
66
"author": "André Lins <andrelucas01@hotmail.com> (https://andrelmlins.github.io/)",

src/index.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
import screenfull from "screenfull";
44
55
let component;
6+
const dispatch = createEventDispatcher();
67
78
onMount(() => {
8-
screenfull.on("change", () => dispatch("onChange"));
9-
screenfull.on("error", () => dispatch("onError"));
9+
screenfull.on("change", () => dispatch("change"));
10+
screenfull.on("error", () => dispatch("error"));
1011
});
1112
1213
const onToggle = () => {

0 commit comments

Comments
 (0)