Fixes types
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { HeadingSnippet, TextSnippet } from '@/snippets/stories-snippets';
|
||||
import { TextSnippet } from '@/snippets/stories-snippets';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
|
||||
# Typography
|
||||
@@ -9,26 +9,6 @@ appearance to match your brand, the underlying API remains consistent and
|
||||
unchanged. Each component is built on a responsive structure, allowing you to
|
||||
define different typography values for various breakpoints.
|
||||
|
||||
## Headings
|
||||
|
||||
Headings are used to structure the content of your page. They are used to
|
||||
create a hierarchy of information and to make the content more readable. The
|
||||
best way to use add these headings to your page is to import the [Heading
|
||||
component](?path=/docs/components-heading--docs).
|
||||
|
||||
<Snippet
|
||||
py={2}
|
||||
open
|
||||
preview={<HeadingSnippet story="AllVariants" />}
|
||||
code={`<Flex direction="column" gap="4">
|
||||
<Heading variant="display">Display</Heading>
|
||||
<Heading variant="title1">Title 1</Heading>
|
||||
<Heading variant="title2">Title 2</Heading>
|
||||
<Heading variant="title3">Title 3</Heading>
|
||||
<Heading variant="title4">Title 4</Heading>
|
||||
</Flex>`}
|
||||
/>
|
||||
|
||||
## Text
|
||||
|
||||
Backstage UI provides four distinct text variants, each offering different font sizes
|
||||
|
||||
@@ -7,7 +7,6 @@ import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { motion } from 'motion/react';
|
||||
import { Fragment } from 'react';
|
||||
import { RiGithubLine, RiNpmjsLine } from '@remixicon/react';
|
||||
|
||||
const data = [
|
||||
{
|
||||
@@ -32,10 +31,6 @@ const data = [
|
||||
},
|
||||
];
|
||||
|
||||
interface SidebarProps {
|
||||
version: string;
|
||||
}
|
||||
|
||||
export const Sidebar = () => {
|
||||
const pathname = usePathname();
|
||||
const isPlayground = pathname.includes('/playground');
|
||||
|
||||
@@ -28,11 +28,13 @@ import * as HeaderStories from '../../../packages/ui/src/components/Header/Heade
|
||||
import * as HeaderPageStories from '../../../packages/ui/src/components/HeaderPage/HeaderPage.stories';
|
||||
|
||||
// Helper function to create snippet components
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const createSnippetComponent = (stories: any) => {
|
||||
return function SnippetComponent({ story }: { story: string }) {
|
||||
const composedStories = composeStories(stories);
|
||||
const StoryComponent = composedStories[
|
||||
story as keyof typeof composedStories
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
] as any;
|
||||
|
||||
return StoryComponent ? <StoryComponent /> : null;
|
||||
|
||||
Reference in New Issue
Block a user