You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
821 B
34 lines
821 B
import type { PropsWithChildren } from 'react';
|
|
import { ArrowSmallLeftIcon } from '@heroicons/react/24/outline';
|
|
import { Button } from '@tih/ui';
|
|
|
|
import Container from '~/components/shared/Container';
|
|
|
|
export type BackButtonLayoutProps = PropsWithChildren<{
|
|
href: string;
|
|
}>;
|
|
|
|
export default function BackButtonLayout({
|
|
href,
|
|
children,
|
|
}: BackButtonLayoutProps) {
|
|
return (
|
|
<Container className="flex flex-col gap-4 pt-4 pb-12" variant="sm">
|
|
<div>
|
|
<Button
|
|
addonPosition="start"
|
|
display="inline"
|
|
href={href}
|
|
icon={ArrowSmallLeftIcon}
|
|
label="Back"
|
|
size="sm"
|
|
variant="secondary"
|
|
/>
|
|
</div>
|
|
<div className="flex w-full justify-center overflow-y-auto">
|
|
{children}
|
|
</div>
|
|
</Container>
|
|
);
|
|
}
|