( style: Record<string, number | string | undefined>, )
| 36 | }; |
| 37 | |
| 38 | const styleToString = ( |
| 39 | style: Record<string, number | string | undefined>, |
| 40 | ): string => { |
| 41 | return Object.keys(style).reduce((str, key) => { |
| 42 | if (style[key] === undefined) return str; |
| 43 | return str + `${key}:${style[key]};`; |
| 44 | }, ""); |
| 45 | }; |
| 46 | |
| 47 | return { |
| 48 | duration: params.duration ?? 200, |