File tree 4 files changed +10
-8
lines changed
4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,15 @@ import externals from "rollup-plugin-node-externals";
6
6
import del from "rollup-plugin-delete" ;
7
7
import copy from "rollup-plugin-copy" ;
8
8
import postcss from "rollup-plugin-postcss" ;
9
- import tailwindcss from "tailwindcss" ;
9
+ import tailwindPostcss from "@ tailwindcss/postcss " ;
10
10
import { readFileSync } from "fs" ;
11
11
const pkg = JSON . parse ( readFileSync ( "./package.json" , { encoding : "utf8" } ) ) ;
12
12
13
13
export default [
14
14
{
15
15
input : "./src/index.ts" ,
16
16
plugins : [
17
- tailwindcss ( ) ,
17
+ tailwindPostcss ( ) ,
18
18
image ( ) ,
19
19
del ( { targets : "build/*" } ) ,
20
20
externals ( { deps : true } ) ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const TranslateWrapper = ({
30
30
children,
31
31
reverse,
32
32
} : {
33
- children : JSX . Element ;
33
+ children : React . ReactNode ;
34
34
reverse ?: boolean ;
35
35
} ) => {
36
36
return (
Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ function Carousel({
61
61
const [ canScrollPrev , setCanScrollPrev ] = React . useState ( false ) ;
62
62
const [ canScrollNext , setCanScrollNext ] = React . useState ( false ) ;
63
63
64
- const onSelect = React . useCallback ( ( api : CarouselApi ) => {
64
+ const onSelect = React . useCallback ( ( ) => {
65
65
if ( ! api ) return ;
66
66
setCanScrollPrev ( api . canScrollPrev ( ) ) ;
67
67
setCanScrollNext ( api . canScrollNext ( ) ) ;
68
- } , [ ] ) ;
68
+ } , [ api ] ) ;
69
69
70
70
const scrollPrev = React . useCallback ( ( ) => {
71
71
api ?. scrollPrev ( ) ;
@@ -95,13 +95,15 @@ function Carousel({
95
95
96
96
React . useEffect ( ( ) => {
97
97
if ( ! api ) return ;
98
-
98
+
99
99
onSelect ( ) ;
100
100
api . on ( "reInit" , onSelect ) ;
101
101
api . on ( "select" , onSelect ) ;
102
102
103
103
return ( ) => {
104
- api ?. off ( "select" , onSelect ) ;
104
+ if ( ! api ) return ;
105
+ api . off ( "select" , onSelect ) ;
106
+ api . off ( "reInit" , onSelect ) ;
105
107
} ;
106
108
} , [ api , onSelect ] ) ;
107
109
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const meta = {
36
36
</ div >
37
37
) ,
38
38
] ,
39
- } satisfies Meta < NeuButtonProps > ;
39
+ } as Meta < NeuButtonProps > ;
40
40
41
41
export default meta ;
42
42
type Story = StoryObj < NeuButtonProps > ;
You can’t perform that action at this time.
0 commit comments