Skip to content

Commit

Permalink
fix(): Update docs component exports.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Sep 16, 2024
1 parent 008bb19 commit 4a914be
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
25 changes: 12 additions & 13 deletions src/custom/docs/components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { cn } from 'src'
import React from 'react'
import { CodeCopy } from './CodeCopy'

const Title = React.forwardRef<
const DocsHeaderTitle = React.forwardRef<
HTMLHeadingElement,
React.InputHTMLAttributes<HTMLParagraphElement>
>(({ className, type, ...props }, ref) => {
Expand All @@ -16,9 +16,9 @@ return (
</h1>
)
})
Title.displayName = 'Title'
DocsHeaderTitle.displayName = 'DocsHeaderTitle'

const Subtitle = React.forwardRef<
const DocsHeaderSubtitle = React.forwardRef<
HTMLHeadingElement,
React.InputHTMLAttributes<HTMLParagraphElement>
>(({ className, type, ...props }, ref) => {
Expand All @@ -31,9 +31,9 @@ return (
</h2>
)
})
Subtitle.displayName = 'Subtitle'
DocsHeaderSubtitle.displayName = 'DocsHeaderSubtitle'

const Left = React.forwardRef<
const DocsHeaderLeft = React.forwardRef<
HTMLDivElement,
React.InputHTMLAttributes<HTMLParagraphElement>
>(({ className, type, ...props }, ref) => {
Expand All @@ -42,34 +42,33 @@ React.InputHTMLAttributes<HTMLParagraphElement>
<div className="mb-4 mt-0 md:mt-6 flex flex-col" ref={ref}>{props.children}</div></div>

})
Left.displayName = 'Left'
DocsHeaderLeft.displayName = 'DocsHeaderLeft'

const Right = React.forwardRef<
const DocsHeaderRight = React.forwardRef<
HTMLDivElement,
React.InputHTMLAttributes<HTMLParagraphElement>
>(({ className, type, ...props }, ref) => {

return <div className="mt-0 mr-10 hidden lg:flex md:justify-end" ref={ref}>{props.children}</div>

})
Right.displayName = 'Right'
DocsHeaderRight.displayName = 'DocsHeaderRight'




// mt-4 flex flex-col max-w-[32rem] gap-3

const Wrapper = React.forwardRef<
const DocsHeaderWrapper = React.forwardRef<
HTMLDivElement,
React.InputHTMLAttributes<HTMLParagraphElement>
>(({ className, type, ...props }, ref) => {
return <div className="flex w-full my-4" ref={ref}>
{props.children}</div>

})
Wrapper.displayName = 'Wrapper'
DocsHeaderWrapper.displayName = 'DocsHeaderWrapper'

const LeftTitle = Title
const LeftSubtitle = Subtitle;

export {Wrapper, Right, Left, LeftTitle, LeftSubtitle, CodeCopy}

export {DocsHeaderWrapper, DocsHeaderRight, DocsHeaderLeft, DocsHeaderTitle, DocsHeaderSubtitle, CodeCopy}
16 changes: 8 additions & 8 deletions stories/custom/docs-header.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { Meta, StoryObj } from "@storybook/react";
import { Wrapper, Right, Left, CodeCopy, LeftTitle, LeftSubtitle } from "src/custom/docs";
import { DocsHeaderWrapper, DocsHeaderRight, DocsHeaderLeft, DocsHeaderTitle, DocsHeaderSubtitle, CodeCopy} from "src/custom/docs";
import { NexusLogo } from "./NexusLogo";
import { Button } from "src";
import { RocketIcon } from "lucide-react";


export function DocsHeaderDemo() {
return <Wrapper>
<Left>
return <DocsHeaderWrapper>
<DocsHeaderLeft>
<NexusLogo
variant="horizontal"
className="w-[18rem] md:w-[23rem]"
/>
<LeftSubtitle>The Full Stack Quantum Computing Platform</LeftSubtitle>
<DocsHeaderSubtitle>The Full Stack Quantum Computing Platform</DocsHeaderSubtitle>
<div className=" mt-4 flex flex-col max-w-[32rem] gap-3">
<CodeCopy textToCopy="pip install qnexus"></CodeCopy>
<Button
Expand All @@ -25,9 +25,9 @@ export function DocsHeaderDemo() {
</a>
</Button>
</div>
</Left>
</DocsHeaderLeft>

<Right>
<DocsHeaderRight>
<img
className="rounded-xl overflow-hidden dark:hidden brightness-110"
src="nexusw.png"
Expand All @@ -45,8 +45,8 @@ export function DocsHeaderDemo() {
alt=""
/>

</Right>
</Wrapper>
</DocsHeaderRight>
</DocsHeaderWrapper>
}

const meta: Meta<typeof DocsHeaderDemo> = {
Expand Down

0 comments on commit 4a914be

Please sign in to comment.