mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(site): add interactive getting started guide (#280)
Co-authored-by: Darius Cepulis <dcepulis@mux.com>
This commit is contained in:
co-authored by
Darius Cepulis
parent
0c530765d5
commit
8ed455c20a
@@ -0,0 +1,32 @@
|
||||
---
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
/**
|
||||
* ContentWidth frame component for constraining content width.
|
||||
*
|
||||
* Applies the standard max-width constraint used throughout the docs
|
||||
* without any visual styling (borders, backgrounds).
|
||||
*
|
||||
* Usage:
|
||||
* ```mdx
|
||||
* import ContentWidth from '@/components/frames/ContentWidth.astro';
|
||||
*
|
||||
* <ContentWidth>
|
||||
* <MyComponent client:idle />
|
||||
* </ContentWidth>
|
||||
* ```
|
||||
*/
|
||||
|
||||
type Props = {
|
||||
class?: string;
|
||||
margins?: 'default' | 'lg';
|
||||
};
|
||||
|
||||
const { class: className, margins = 'default' } = Astro.props;
|
||||
|
||||
const marginClass = margins === 'lg' ? 'my-12' : 'my-6';
|
||||
---
|
||||
|
||||
<div class={twMerge('max-w-3xl mx-auto', marginClass, className)}>
|
||||
<slot />
|
||||
</div>
|
||||
@@ -13,20 +13,25 @@ import { twMerge } from 'tailwind-merge';
|
||||
* import Minimal from '@/components/frames/Minimal.astro';
|
||||
*
|
||||
* <MinimalFrame>
|
||||
* <MyDemo client:visible />
|
||||
* <MyDemo client:idle />
|
||||
* </MinimalFrame>
|
||||
* ```
|
||||
*/
|
||||
|
||||
type Props = {
|
||||
class?: string;
|
||||
margins?: 'default' | 'lg';
|
||||
};
|
||||
const { class: className } = Astro.props;
|
||||
|
||||
const { class: className, margins = 'default' } = Astro.props;
|
||||
|
||||
const marginClass = margins === 'lg' ? 'my-12' : 'my-6';
|
||||
---
|
||||
|
||||
<div
|
||||
class={twMerge(
|
||||
'relative w-full max-w-3xl mx-auto flex rounded-lg overflow-hidden border border-light-40 dark:border-dark-80 bg-light-100 dark:bg-dark-110',
|
||||
marginClass,
|
||||
className,
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user