Skip to content

Commit 3eb9b8e

Browse files
committed
optional type
1 parent fbd7354 commit 3eb9b8e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dist/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type RedrawOptions = {
44
};
55
type ElementOptions = {
66
observe?: boolean;
7-
onResize?: (rect: DOMRect, element: HTMLElement) => void;
7+
onResize?: (rect?: DOMRect, element?: HTMLElement) => void;
88
};
99

1010
declare enum CornerType {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@monokai/monoco",
3-
"version": "0.0.12",
3+
"version": "0.0.13",
44
"author": "Monokai",
55
"license": "MIT",
66
"description": "Custom (squircle) corners and borders for html elements",

src/utils/ElementManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type RedrawOptions = {
88
type ElementSpecs = {
99
draw: (redrawOptions?:RedrawOptions) => void,
1010
cornerOptions: CornerOptions,
11-
onResize?: (rect:DOMRect, element:HTMLElement) => void,
11+
onResize?: (rect?:DOMRect, element?:HTMLElement) => void,
1212
previousW: number | null,
1313
previousH: number | null,
1414
element: HTMLElement
@@ -17,7 +17,7 @@ type ElementSpecs = {
1717
export type ElementOptions = {
1818
observe?:boolean,
1919
// useCSS?:boolean,
20-
onResize?:(rect:DOMRect, element:HTMLElement) => void
20+
onResize?:(rect?:DOMRect, element?:HTMLElement) => void
2121
}
2222

2323
export default new class ElementManager {

0 commit comments

Comments
 (0)