mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
docs: initial concepts and recipes (#147)
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
---
|
||||
// Simple container component for constraining content width in documentation
|
||||
---
|
||||
|
||||
<div class="w-full max-w-3xl mx-auto">
|
||||
<slot />
|
||||
</div>
|
||||
@@ -2,11 +2,12 @@
|
||||
import { isValidFramework, isValidStyleForFramework } from '@/types/docs';
|
||||
import { resolveDocsLinkUrl } from '@/utils/docs/routing';
|
||||
import type { HTMLAttributes } from 'astro/types';
|
||||
import A from '../typography/A.astro';
|
||||
|
||||
interface Props extends Omit<HTMLAttributes<'a'>, 'href'> {
|
||||
slug: string;
|
||||
}
|
||||
const { slug, ...rest } = Astro.props;
|
||||
const { slug } = Astro.props;
|
||||
|
||||
const { framework: paramFramework, style: paramStyle } = Astro.params;
|
||||
if (!paramFramework || !isValidFramework(paramFramework)) {
|
||||
@@ -23,6 +24,6 @@ const { url: href } = resolveDocsLinkUrl({
|
||||
});
|
||||
---
|
||||
|
||||
<a href={href} {...rest}>
|
||||
<A href={href}>
|
||||
<slot />
|
||||
</a>
|
||||
</A>
|
||||
|
||||
@@ -29,7 +29,7 @@ const isActive = containsActivePath(item);
|
||||
|
||||
{
|
||||
isSection(item) ? (
|
||||
<details open class="group" style={`padding-left: calc(var(--spacing) * ${depth * 4})`}>
|
||||
<details open class="group my-4 first:mt-0" style={`padding-left: calc(var(--spacing) * ${depth * 4})`}>
|
||||
<summary
|
||||
class:list={[
|
||||
'py-2 flex items-center gap-4 ',
|
||||
|
||||
Reference in New Issue
Block a user