Skip to content

Commit c4bbab9

Browse files
Added: Introduction page added.
1 parent 55448f9 commit c4bbab9

File tree

102 files changed

+163
-988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+163
-988
lines changed

app/components/CodeHighlight.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ const CodeHighlight: FC<CodeHighlightProps> = ({ code }) => {
3636
<button
3737
onClick={() => {
3838
copyToClipboard(Object.values(code)[codeType])
39-
toast.success('Copied to clipboard')
39+
toast.success('Code Copied!', {
40+
classNames: {
41+
toast:
42+
'dark:!bg-metal-900/30 dark:!text-white dark:!border-metal-800 !bg-white !text-metal-900 !border-metal-50',
43+
},
44+
})
4045
}}
4146
className="mx-6 my-2.5">
4247
{copy ? <Check size={20} weight="light" color="#fff" /> : <Copy size={20} weight="light" color="#fff" />}

app/components/CodeHighlightPreview.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ const CodeHighlightPreview = forwardRef<HTMLDivElement, CodeHighlightPreviewProp
2323
<div
2424
ref={ref}
2525
className={cn(
26-
'my-10 max-w-full overflow-hidden rounded-xl border border-metal-200 dark:border-metal-800 ',
26+
'my-10 max-w-full overflow-hidden rounded-xl border border-metal-200 dark:border-metal-800',
2727
className,
2828
)}>
29-
<div className="flex items-center justify-between bg-[#0D1015] dark:bg-metal-900/60">
29+
<div className="flex items-center justify-between bg-[#0D1015] dark:bg-metal-900/90">
3030
<div className="flex items-center">
3131
<button
3232
type="button"
@@ -58,7 +58,12 @@ const CodeHighlightPreview = forwardRef<HTMLDivElement, CodeHighlightPreviewProp
5858
<button
5959
onClick={() => {
6060
copyToClipboard(Object.values(code)[active === 0 ? 0 : active - 1])
61-
toast.success('Copied to clipboard')
61+
toast.success('Code Copied!', {
62+
classNames: {
63+
toast:
64+
'dark:!bg-metal-900/30 dark:!text-white dark:!border-metal-800 !bg-white !text-metal-900 !border-metal-50',
65+
},
66+
})
6267
}}
6368
className="mx-6 my-2.5">
6469
{copy ? <Check size={20} weight="light" color="#fff" /> : <Copy size={20} weight="light" color="#fff" />}

app/components/DocSidebar.tsx

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22
import Link from 'next/link'
33
import { usePathname } from 'next/navigation'
4-
import { gettingStartedRoutes, layoutRoutes, routes } from '../../routes/routes'
4+
import { gettingStartedRoutes, routes } from '../../routes/routes'
55
import { Accordion, AccordionAction, AccordionContent, AccordionItem, AccordionTitle } from '../src'
66

77
const DocSidebar = () => {
@@ -43,32 +43,6 @@ const DocSidebar = () => {
4343
</AccordionContent>
4444
</AccordionItem>
4545
</Accordion>
46-
<Accordion collapsible type="single" flush defaultValue="layout">
47-
<AccordionItem className="border-b-0" value="layout">
48-
<AccordionAction className="px-0 py-0">
49-
<AccordionTitle className="text-body-4 font-semibold text-metal-900 dark:text-white">
50-
Layout
51-
</AccordionTitle>
52-
</AccordionAction>
53-
<AccordionContent className="p-0">
54-
<ul className="mt-3 space-y-1.5 border-l border-l-metal-100 dark:border-l-metal-800">
55-
{layoutRoutes.map((route) => (
56-
<li key={route.id}>
57-
<Link
58-
className={`-ml-px border-l border-l-transparent pl-3 text-body-4 font-medium text-metal-500 hover:-ml-px hover:border-l hover:border-metal-500 hover:text-metal-900 dark:text-metal-400 dark:hover:border-white dark:hover:text-white ${
59-
IsActive(route.href)
60-
? 'border-l !border-primary-500 text-primary-500 transition-colors duration-150 hover:text-primary-500 dark:!border-white dark:text-white dark:hover:text-white'
61-
: ''
62-
}`}
63-
href={route.href}>
64-
{route.name}
65-
</Link>
66-
</li>
67-
))}
68-
</ul>
69-
</AccordionContent>
70-
</AccordionItem>
71-
</Accordion>
7246
<Accordion collapsible type="single" flush defaultValue="components">
7347
<AccordionItem className="border-b-0" value="components">
7448
<AccordionAction className="px-0 py-0">

app/components/Header.tsx

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { List, X } from 'phosphor-react'
66
import { useEffect, useState } from 'react'
77
import KeepDarkLogo from '../../public/images/keep-dark.svg'
88
import KeepLogo from '../../public/images/keep.svg'
9-
import { gettingStartedRoutes, layoutRoutes, navbarRoutes, routes } from '../../routes/routes'
9+
import { gettingStartedRoutes, navbarRoutes, routes } from '../../routes/routes'
1010
import {
1111
Accordion,
1212
AccordionAction,
@@ -139,32 +139,6 @@ const Header = () => {
139139
</AccordionContent>
140140
</AccordionItem>
141141
</Accordion>
142-
<Accordion collapsible type="single" flush defaultValue="layout">
143-
<AccordionItem className="border-b-0" value="layout">
144-
<AccordionAction className="px-0 py-0">
145-
<AccordionTitle className="text-body-4 font-semibold text-metal-900 dark:text-white">
146-
Layout
147-
</AccordionTitle>
148-
</AccordionAction>
149-
<AccordionContent className="p-0">
150-
<ul className="mt-3 space-y-1.5 border-l border-l-metal-100 dark:border-l-metal-800">
151-
{layoutRoutes.map((route) => (
152-
<li key={route.id}>
153-
<Link
154-
className={`-ml-px border-l border-l-transparent pl-3 text-body-4 font-medium text-metal-500 hover:-ml-px hover:border-l hover:border-metal-500 hover:text-metal-900 dark:text-metal-400 dark:hover:border-white dark:hover:text-white ${
155-
IsActive(route.href)
156-
? 'border-l !border-primary-500 text-primary-500 transition-colors duration-150 hover:text-primary-500 dark:!border-white dark:text-white dark:hover:text-white'
157-
: ''
158-
}`}
159-
href={route.href}>
160-
{route.name}
161-
</Link>
162-
</li>
163-
))}
164-
</ul>
165-
</AccordionContent>
166-
</AccordionItem>
167-
</Accordion>
168142
<Accordion collapsible type="single" flush defaultValue="components">
169143
<AccordionItem className="border-b-0" value="components">
170144
<AccordionAction className="px-0 py-0">

app/docs.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@
88
#mainContent > p a {
99
@apply text-primary-600 underline;
1010
}
11+
1112
#mainContent > ul li {
12-
@apply mb-3 mt-4 text-body-4 font-normal text-metal-600 dark:text-metal-300;
13+
@apply my-3 text-body-4 font-normal text-metal-600 dark:text-metal-300;
14+
}
15+
16+
#mainContent > ul li strong {
17+
@apply text-metal-900 dark:text-primary-500;
18+
}
19+
20+
#mainContent > ul li a {
21+
@apply text-primary-500 underline dark:text-primary-500;
1322
}
1423

1524
#mainContent code {

app/docs/components/accordion/index.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/docs/components/accordion/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Metadata, NextPage } from 'next'
2-
import AccordionDocs from '.'
32
import { DocsContentLayout } from '../../../components/DocsContentLayout'
43
import EditPage from '../../../components/EditPage'
4+
import AccordionDocsContent from './accordion.mdx'
55

66
export const metadata: Metadata = {
77
description:
@@ -12,7 +12,7 @@ export const metadata: Metadata = {
1212
const page: NextPage = () => {
1313
return (
1414
<DocsContentLayout description={`${metadata.description}`} title={`${metadata.title}`}>
15-
<AccordionDocs />
15+
<AccordionDocsContent />
1616
<EditPage pageLink="/docs/components/accordion" nextPageLink="/docs/components/alert" nextPageName="Alert" />
1717
</DocsContentLayout>
1818
)

app/docs/components/alert/index.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/docs/components/alert/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Metadata, NextPage } from 'next'
2-
import AlertDocs from '.'
32
import { DocsContentLayout } from '../../../components/DocsContentLayout'
43
import EditPage from '../../../components/EditPage'
4+
import AlertDocsContent from './alert.mdx'
55

66
export const metadata: Metadata = {
77
description:
@@ -12,7 +12,7 @@ export const metadata: Metadata = {
1212
const page: NextPage = () => {
1313
return (
1414
<DocsContentLayout description={`${metadata.description}`} title={`${metadata.title}`}>
15-
<AlertDocs />
15+
<AlertDocsContent />
1616
<EditPage pageLink="/docs/components/alert" nextPageLink="/docs/components/areaChart" nextPageName="Area Chart" />
1717
</DocsContentLayout>
1818
)

app/docs/components/avatar/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Metadata, NextPage } from 'next'
2-
import AvatarDocs from '.'
32
import { DocsContentLayout } from '../../../components/DocsContentLayout'
43
import EditPage from '../../../components/EditPage'
4+
import AvatarDocsContent from './avatar.mdx'
55

66
export const metadata: Metadata = {
77
description:
@@ -12,7 +12,7 @@ export const metadata: Metadata = {
1212
const page: NextPage = () => {
1313
return (
1414
<DocsContentLayout description={`${metadata.description}`} title={`${metadata.title}`}>
15-
<AvatarDocs />
15+
<AvatarDocsContent />
1616
<EditPage pageLink="/docs/components/avatar" nextPageLink="/docs/components/badge" nextPageName="Badge" />
1717
</DocsContentLayout>
1818
)

0 commit comments

Comments
 (0)