File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -151,8 +151,9 @@ function AppCore() {
151151 ) }
152152
153153 { articles . hasNextPage && (
154- < button onClick = { ( ) => articles . fetchNextPage ( ) } disabled = { articles . isFetchingNextPage } className = "btn btn-primary mt -4" >
154+ < button onClick = { ( ) => articles . fetchNextPage ( ) } disabled = { articles . isFetching } className = "btn btn-primary m -4" >
155155 Load next page
156+ { articles . isFetching && < span className = "loader" /> }
156157 </ button >
157158 ) }
158159 </ >
Original file line number Diff line number Diff line change 33@tailwind utilities;
44
55.btn {
6- @apply px-4 py-2 rounded;
6+ @apply px-4 py-2 rounded inline-flex flex-row gap-1;
7+
8+ & [disabled ] {
9+ @apply bg-gray-300 text-gray-500 hover:bg-gray-300 cursor-not-allowed;
10+ }
711}
812
913.btn-primary {
1721.btn-danger {
1822 @apply bg-red-500 text-white hover:bg-red-700;
1923}
24+
25+ .loader {
26+ @apply inline-block w-5 h-5 border-[3px ] border-transparent border-t-gray-200 rounded-full animate-spin align-middle;
27+ animation-duration : 400ms ;
28+ }
You can’t perform that action at this time.
0 commit comments