File tree 3 files changed +7
-4
lines changed
packages/svelte-ux/src/lib/actions
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 2
2
' svelte-ux ' : patch
3
3
---
4
4
5
- Fix: Make ScrollFadeOptions optional in ` scrollFade ` action
5
+ Make options optional ` scrollFade ` , ` scrollShadow ` , and ` sticky ` actions
Original file line number Diff line number Diff line change @@ -48,7 +48,10 @@ type ScrollShadowOptions = {
48
48
} ;
49
49
} ;
50
50
51
- export const scrollShadow : Action < HTMLElement , ScrollShadowOptions > = ( node , options ) => {
51
+ export const scrollShadow : Action < HTMLElement , ScrollShadowOptions | undefined > = (
52
+ node ,
53
+ options
54
+ ) => {
52
55
const defaultOptions = {
53
56
offset : 10 ,
54
57
blur : 6 ,
@@ -169,7 +172,7 @@ type ScrollFadeOptions = {
169
172
scrollRatio ?: number ;
170
173
} ;
171
174
172
- export const scrollFade : Action < HTMLElement , ScrollFadeOptions > = ( node , options ? ) => {
175
+ export const scrollFade : Action < HTMLElement , ScrollFadeOptions | undefined > = ( node , options ) => {
173
176
const length = options ?. length ?? 50 ;
174
177
const scrollRatio = options ?. scrollRatio ?? 5 ;
175
178
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ type StickyOptions = {
13
13
TODO
14
14
- [ ] Consider raising a `stuck` event for styling (example: https://svelte.dev/repl/4ad71e00c86c47d29806e17f09ff0869?version=3.35.0)
15
15
*/
16
- export const sticky : Action < HTMLElement , StickyOptions > = ( node , options ) => {
16
+ export const sticky : Action < HTMLElement , StickyOptions | undefined > = ( node , options ) => {
17
17
// Track changes so they can be reversed on an update
18
18
const tracker = new DomTracker ( node ) ;
19
19
You can’t perform that action at this time.
0 commit comments