mirror of
https://github.com/zoriya/v10.git
synced 2026-08-09 07:37:48 +00:00
40 lines
791 B
Plaintext
40 lines
791 B
Plaintext
---
|
|
|
|
import { twMerge } from '@/utils/twMerge';
|
|
|
|
/**
|
|
* Minimal frame component for wrapping documentation demos.
|
|
*
|
|
* Provides a styled container with rounded borders and background
|
|
* matching the site's Tabs component aesthetic.
|
|
*
|
|
* Usage:
|
|
* ```mdx
|
|
* import Minimal from '@/components/frames/Minimal.astro';
|
|
*
|
|
* <MinimalFrame>
|
|
* <MyDemo client:idle />
|
|
* </MinimalFrame>
|
|
* ```
|
|
*/
|
|
|
|
type Props = {
|
|
class?: string;
|
|
margins?: 'default' | 'lg';
|
|
};
|
|
|
|
const { class: className, margins = 'default' } = Astro.props;
|
|
|
|
const marginClass = margins === 'lg' ? 'my-8' : 'my-4';
|
|
---
|
|
|
|
<div
|
|
class={twMerge(
|
|
"relative w-full max-w-3xl mx-auto flex rounded-xs overflow-hidden border border-faded-black dark:border-manila-dark",
|
|
marginClass,
|
|
className,
|
|
)}
|
|
>
|
|
<slot />
|
|
</div>
|