chore: enforce common prop typing style

This commit is contained in:
Ilia Mashkov
2026-05-23 13:06:56 +03:00
parent 7e87cbc3ae
commit 83ddd2724f
14 changed files with 28 additions and 28 deletions
+2 -2
View File
@@ -19,9 +19,9 @@ export async function generateStaticParams() {
}
}
type Props = {
export interface Props {
params: Promise<{ slug?: string[] }>;
};
}
/**
* Portfolio page — one route per section, sections list always visible.
@@ -1,6 +1,6 @@
import { Badge, Card, CardSidebar, CardTitle, RichText } from '$shared/ui';
type Props = {
export interface Props {
/**
* Job title
*/
@@ -25,7 +25,7 @@ type Props = {
* Additional CSS classes forwarded to the card
*/
className?: string;
};
}
/**
* Work experience card with sidebar layout.
@@ -2,7 +2,7 @@ import Image from 'next/image';
import { Card, RichText } from '$shared/ui';
import { ProjectMetadata } from '../ProjectMetadata/ProjectMetadata';
type Props = {
export interface Props {
/**
* Project name
*/
@@ -36,7 +36,7 @@ type Props = {
* @default false
*/
reverse?: boolean;
};
}
/**
* Full-width detailed project card with metadata sidebar.
@@ -1,7 +1,7 @@
import { cn } from '$shared/lib';
import { Badge, Button, Card, CardSidebar, CardTitle, ImageLightbox, RichText } from '$shared/ui';
type Props = {
export interface Props {
/**
* Project name
*/
@@ -32,7 +32,7 @@ type Props = {
* @default false
*/
priority?: boolean;
};
}
/**
* Project card with sidebar layout.
@@ -1,6 +1,6 @@
import { cn } from '$shared/lib';
type Props = {
export interface Props {
/**
* Project year
*/
@@ -17,7 +17,7 @@ type Props = {
* Additional CSS classes
*/
className?: string;
};
}
/**
* Sidebar metadata display for a project: year, role, and stack.
+2 -2
View File
@@ -1,9 +1,9 @@
type Props = {
export interface Props {
/**
* CSS classes on the svg element
*/
className?: string;
};
}
/**
* Close / X icon (Lucide).
+2 -2
View File
@@ -1,9 +1,9 @@
type Props = {
export interface Props {
/**
* CSS classes on the svg element
*/
className?: string;
};
}
/**
* Magnify / search icon (Lucide).
@@ -7,7 +7,7 @@ import { cn } from '$shared/lib';
import { Button } from '$shared/ui/Button';
import { Modal, type ModalHandle } from '$shared/ui/Modal';
type Props = {
export interface Props {
/**
* Image source URL
*/
@@ -33,7 +33,7 @@ type Props = {
* @default '(min-width: 1024px) 56rem, 100vw'
*/
sizes?: string;
};
}
/**
* Clickable image thumbnail that opens a fullscreen brutalist dialog on click.
+2 -2
View File
@@ -1,7 +1,7 @@
import parse from 'html-react-parser';
import { cn } from '$shared/lib';
type Props = {
export interface Props {
/**
* SVG markup string to inline as React elements
*/
@@ -10,7 +10,7 @@ type Props = {
* Additional CSS classes on the wrapper span
*/
className?: string;
};
}
/**
* Parses an SVG markup string into React elements.
+2 -2
View File
@@ -23,14 +23,14 @@ export type ModalHandle = {
close: () => void;
};
type Props = DialogHTMLAttributes<HTMLDialogElement> & {
export interface Props extends DialogHTMLAttributes<HTMLDialogElement> {
/**
* Called when the user activates the backdrop (click or Enter/Space).
* Replaces the default close — useful when the close path must be wrapped
* (e.g. in a view transition). When omitted, the dialog closes itself.
*/
onBackdropClose?: () => void;
};
}
/**
* Thin wrapper over native `<dialog>` with `showModal()`. Locks body scroll
+2 -2
View File
@@ -1,7 +1,7 @@
import parse from 'html-react-parser';
import { cn } from '$shared/lib';
type Props = {
export interface Props {
/**
* HTML string from PocketBase rich-text editor
*/
@@ -10,7 +10,7 @@ type Props = {
* Additional CSS classes merged onto the wrapper div
*/
className?: string;
};
}
/**
* Renders a PocketBase rich-text HTML string as React elements.
@@ -6,7 +6,7 @@ import { Fragment, type ReactNode, ViewTransition as VT } from 'react';
*/
const Transition = (VT ?? Fragment) as typeof VT;
type Props = {
export interface Props {
/**
* Maps to the view-transition-name CSS property
*/
@@ -15,7 +15,7 @@ type Props = {
* Content to animate
*/
children: ReactNode;
};
}
/**
* Wraps children in React's ViewTransition when available,
@@ -3,12 +3,12 @@
import type { ErrorInfo, ReactNode } from 'react';
import { Component } from 'react';
type Props = {
export interface Props {
/**
* Section content to render
*/
children: ReactNode;
};
}
type State = {
/**
@@ -3,7 +3,7 @@ import { Children } from 'react';
import type { SectionRecord } from '$entities/Section';
import { SectionAccordion } from '$entities/Section';
type Props = {
export interface Props {
/**
* Ordered section metadata — drives navigation labels and IDs
*/
@@ -17,7 +17,7 @@ type Props = {
* Pre-rendered RSC content slots, one per section, matched by index
*/
children: ReactNode;
};
}
/**
* Renders all portfolio sections as an accordion list.