mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(website): init dark mode
This commit is contained in:
@@ -8,13 +8,15 @@ type Props<Tag extends HTMLTag = 'pre'> = Polymorphic<{ as: Tag }> & {
|
||||
class?: string;
|
||||
};
|
||||
|
||||
const { as: Tag = 'pre', maxWidth = true, class: className, style, ...props } = Astro.props;
|
||||
const { as: Tag = 'pre', maxWidth = true, class: className, style: _style, ...props } = Astro.props;
|
||||
---
|
||||
|
||||
<div class={twMerge(clsx('relative my-6 group', maxWidth && 'max-w-3xl mx-auto'))}>
|
||||
<Tag
|
||||
class={twMerge('rounded-lg p-6 overflow-x-auto overflow-y-scroll max-h-96 border border-light-40', className)}
|
||||
style={`${style};background-color:var(--color-light-100);`}
|
||||
class={twMerge(
|
||||
'rounded-lg p-6 overflow-x-auto overflow-y-scroll max-h-96 border border-light-40 dark:border-dark-80 bg-light-100 dark:bg-dark-110',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<slot />
|
||||
|
||||
Reference in New Issue
Block a user