mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
fix: gap
This commit is contained in:
1 parent
0e57943d33
commit
0869ea09c8
5 files changed
+14
-12
No files matched your search
@@ -21,7 +21,7 @@ const strings = await api.strings(locale);
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<Section>
|
<Section gap="4">
|
||||||
<Heading size="2" className="title">{strings.home.tanks}</Heading>
|
<Heading size="2" className="title">{strings.home.tanks}</Heading>
|
||||||
|
|
||||||
<HomeTanksPopular {locale} client:load />
|
<HomeTanksPopular {locale} client:load />
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&[data-first="true"] .content {
|
&[data-first="true"] .content {
|
||||||
|
|||||||
@@ -1,19 +1,28 @@
|
|||||||
import type { ComponentProps } from "react";
|
import type { ComponentProps } from "react";
|
||||||
import { classNames } from "../../core/ui/classNames";
|
import { classNames } from "../../core/ui/classNames";
|
||||||
|
import type { Space } from "../../types/space";
|
||||||
import styles from "./index.module.css";
|
import styles from "./index.module.css";
|
||||||
|
|
||||||
export interface SectionProps extends ComponentProps<"div"> {
|
export interface SectionProps extends ComponentProps<"div"> {
|
||||||
first?: boolean;
|
first?: boolean;
|
||||||
|
gap: Space;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Section({ className, children, ...props }: SectionProps) {
|
export function Section({
|
||||||
|
className,
|
||||||
|
gap = "5",
|
||||||
|
children,
|
||||||
|
...props
|
||||||
|
}: SectionProps) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-first={props.first}
|
data-first={props.first}
|
||||||
className={classNames(styles.section, className)}
|
className={classNames(styles.section, className)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<div className={styles.content}>{children}</div>
|
<div className={styles.content} style={{ gap: `var(--space-${gap})` }}>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -10,14 +10,7 @@ export const getStaticPaths = (async () => {
|
|||||||
}) satisfies GetStaticPaths;
|
}) satisfies GetStaticPaths;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a very long.
|
* Returns data on an avatar based on its id. @see avatars/list.json for a list of all avatar ids.
|
||||||
* And boring.
|
|
||||||
*
|
|
||||||
* But important.
|
|
||||||
* Developer comment.
|
|
||||||
*
|
|
||||||
* Meant to test.
|
|
||||||
* The **formatting**!
|
|
||||||
*/
|
*/
|
||||||
export async function GET({ params }: APIContext<never, { id: string }>) {
|
export async function GET({ params }: APIContext<never, { id: string }>) {
|
||||||
const avatar = await api.avatar(params.id);
|
const avatar = await api.avatar(params.id);
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export type Space = `${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`;
|
||||||
Reference in new issue
Block a user