diff --git a/layout/DefaultLayout.tsx b/layout/DefaultLayout.tsx index 51e26711..05152656 100644 --- a/layout/DefaultLayout.tsx +++ b/layout/DefaultLayout.tsx @@ -9,7 +9,7 @@ import { function DefaultLayoutContent({ children }: React.PropsWithChildren) { const headerRef = useRef(null); - const { height, showPromotionBar, setHeight } = usePromotion(); + const { showPromotionBar, setHeight } = usePromotion(); const prevShowPromotionBar = useRef(null); useEffect(() => { @@ -41,12 +41,7 @@ function DefaultLayoutContent({ children }: React.PropsWithChildren) {
-
- {children} -
+
{children}
); } diff --git a/layout/ManageLayout.tsx b/layout/ManageLayout.tsx index 9d52e666..7f0b257e 100644 --- a/layout/ManageLayout.tsx +++ b/layout/ManageLayout.tsx @@ -28,11 +28,11 @@ export default function ManageLayout({ children }: React.PropsWithChildren) { 個人名片 - + 百寶箱 - + { return (
-
+
-
- ); } diff --git a/shared/components/Sidebar.tsx b/shared/components/Sidebar.tsx index c96cca0f..65d1ca68 100644 --- a/shared/components/Sidebar.tsx +++ b/shared/components/Sidebar.tsx @@ -92,7 +92,37 @@ function SidebarLink({ ); } +interface SidebarItemProps + extends React.HTMLAttributes { + isActive?: boolean; + isDisabled?: boolean; +} + +function SidebarItem({ + children, + className, + isActive, + isDisabled, + ...props +}: SidebarItemProps) { + return ( +
+ {children} +
+ ); +} + Sidebar.Button = SidebarButton; Sidebar.Link = SidebarLink; +Sidebar.Item = SidebarItem; export default Sidebar; diff --git a/tailwind.config.js b/tailwind.config.js index 578908e8..d13ed08b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -150,6 +150,21 @@ module.exports = { }, }, }, + [`.animate-button-ripple`]: { + animation: + 'button-ripple var(--animation-duration, 500ms) var(--animation-delay, 0ms) forwards cubic-bezier(0, 0, 0.2, 1)', + '@keyframes button-ripple': { + '0%': { transform: 'translate(-50%, -50%) scale(0)', opacity: 1 }, + '75%': { + transform: 'translate(-50%, -50%) scale(4)', + opacity: 0.2, + }, + '100%': { + transform: 'translate(-50%, -50%) scale(6)', + opacity: 0, + }, + }, + }, }); addUtilities({ [`.animate-slide-x-in`]: { @@ -174,9 +189,10 @@ module.exports = { }); addUtilities({ ['.min-h-screen-with-padding-top']: { - minHeight: 'calc(100vh - var(--padding-top, 0px))' - } - }) + paddingTop: 'var(--padding-top, 0px)', + minHeight: 'calc(100vh - var(--padding-top, 0px))', + }, + }); }), ], };