-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove the usage of style-jsx (and so of "use client") in <…
…Scroller/> By moving animation into tailwind.config.js file
- Loading branch information
Showing
6 changed files
with
19 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,18 @@ | ||
"use client"; | ||
import clsx from "clsx"; | ||
import { FC } from "react"; | ||
|
||
export interface ScrollerProps { | ||
className?: string; | ||
} | ||
|
||
const Scroller: FC<ScrollerProps> = ({ className }) => ( | ||
export const Scroller: FC<ScrollerProps> = ({ className }) => ( | ||
<div | ||
className={clsx( | ||
"border-4 rounded-lg border-fg/70 border-solid h-10 w-6 p-1", | ||
className | ||
)} | ||
> | ||
<style jsx>{` | ||
@keyframes roll { | ||
0% { | ||
opacity: 0; | ||
} | ||
20% { | ||
margin-top: 0; | ||
opacity: 1; | ||
} | ||
80% { | ||
margin-top: 16px; | ||
opacity: 1; | ||
} | ||
100% { | ||
opacity: 0; | ||
} | ||
} | ||
.wheel { | ||
animation: 2s infinite normal roll ease; | ||
} | ||
`}</style> | ||
<div className="wheel bg-fg/70 w-2 h-2 rounded-full"></div> | ||
<div className="animate-roll bg-fg/70 w-2 h-2 rounded-full"></div> | ||
</div> | ||
); | ||
export default Scroller; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./Button"; | ||
export * from "./Scroller"; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters