-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove horizonal padding from routes
- Loading branch information
1 parent
048164b
commit a9efaae
Showing
4 changed files
with
31 additions
and
3 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
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,27 @@ | ||
import { cn } from "@/lib/cssUtils"; | ||
import { Slot } from "@radix-ui/react-slot"; | ||
import type { HTMLAttributes } from "react"; | ||
|
||
interface DashboardContainerProps extends HTMLAttributes<HTMLDivElement> { | ||
asChild?: boolean; | ||
} | ||
|
||
export const DashboardContainer = ({ | ||
children, | ||
className, | ||
asChild = false, | ||
...props | ||
}: DashboardContainerProps) => { | ||
const Comp = asChild ? Slot : "div"; | ||
return ( | ||
<Comp | ||
className={cn( | ||
"mx-auto w-full max-w-screen-lg px-4 sm:px-8 md:px-10", | ||
className, | ||
)} | ||
{...props} | ||
> | ||
{children} | ||
</Comp> | ||
); | ||
}; |