mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Add UserButton to stack-server
This commit is contained in:
parent
23bdf623b6
commit
97505250f1
@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
import { Logo } from "@/components/logo";
|
||||
import { Sheet, SheetProps, Stack } from "@mui/joy";
|
||||
import { UserButton } from "@stackframe/stack";
|
||||
|
||||
export function Header(props: SheetProps & { headerHeight: number }) {
|
||||
const { headerHeight, ...sheetProps } = props;
|
||||
@ -20,6 +21,7 @@ export function Header(props: SheetProps & { headerHeight: number }) {
|
||||
borderRight: 'none',
|
||||
display: 'flex',
|
||||
alignItems: 'stretch',
|
||||
justifyContent: 'space-between',
|
||||
height: `${headerHeight}px`,
|
||||
...(sheetProps.sx ?? {}),
|
||||
}}
|
||||
@ -27,6 +29,7 @@ export function Header(props: SheetProps & { headerHeight: number }) {
|
||||
<Stack sx={{ marginLeft: 2, justifyContent: 'center', height: headerHeight - 1 }}>
|
||||
<Logo full height={24} href="/projects" />
|
||||
</Stack>
|
||||
<UserButton />
|
||||
</Sheet>
|
||||
);
|
||||
}
|
||||
|
||||
@ -37,8 +37,8 @@ const StyledContent = styled(DropdownMenuPrimitive.Content)<{
|
||||
`;
|
||||
|
||||
const DropdownMenuContent = React.forwardRef<
|
||||
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
||||
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
||||
>(({ className, sideOffset = 4, ...props }, ref) => {
|
||||
const { colors } = useDesign();
|
||||
return (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user