Skip to content

Commit bd89082

Browse files
authored
Fixed layout of docs (#886)
1 parent d5e1e1c commit bd89082

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

docs/app/docs/layout.tsx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
1+
import Link from '@radui/ui/Link';
12
import Navigation from '@/components/navigation/Navigation';
23
import Callout from '@radui/ui/Callout';
3-
import Link from '@radui/ui/Link';
44

55
const InfoIcon = () => {
66
return (<svg width="18" height="18" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z" fill="currentColor" fillRule="evenodd" clipRule="evenodd"></path></svg>);
77
};
88

9-
const Layout = ({ children }: any) => {
9+
const layout = ({ children }: any) => {
10+
11+
12+
1013
return (
11-
<div data-accent-color="blue" className="flex space-x-2 w-full max-h-screen overflow-y-auto">
12-
<div className='flex-none h-full flex flex-col'>
14+
<div className= " md:flex max-h-screen overflow-y-auto">
15+
<div className='md:flex'>
1316
<Navigation />
1417
</div>
1518
<div className='lg:px-4 text-gray-1000 flex-1 flex flex-col gap-4 overflow-y-scroll pt-2' id="docs-content">
16-
17-
<div className='md:mt-2 md:max-w-[1440px] lg:mx-auto'>
18-
<Callout color="green">
19-
<div className='flex-none'>
20-
<InfoIcon />
21-
</div>
22-
<div>
19+
<div className=' p-4 md:mx-auto md:max-w-[1440px]'>
20+
<Callout color="green">
21+
<div className='flex-none'>
22+
<InfoIcon />
23+
</div>
24+
2325
<div >
24-
Rad UI is under active development and looking for contributors to shape the future of the library. If you'd like to contribute to Rad UI, please check out <Link href="/docs/contributing/before-you-start">Getting Started</Link>
26+
Rad UI is under active development and looking for contributors to shape the future of the library. If you'd like to contribute to Rad UI, please check out <Link href="/docs/contributing/before-you-start">Getting Started</Link>
2527
</div>
28+
29+
</Callout>
30+
<div >
31+
{children}
2632
</div>
27-
</Callout>
28-
{children}
2933
</div>
3034
</div>
3135
</div>
32-
);
33-
};
36+
)
37+
}
3438

35-
export default Layout;
39+
export default layout;

docs/components/layout/Documentation/Documentation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Documentation = ({ title = '', description = '', currentPage = undefined,
2323
const next = DOCS_SEO.getNext(currentPage);
2424
const NEXT_PAGE_TITLE = next?.basic_title || '';
2525

26-
return <div>
26+
return <div className='w-full max-w-screen-lg mx-auto'>
2727
<div>
2828
<div className='flex items-center space-x-4'>
2929
<BookMarkLink id={title}> <Heading>{title}</Heading> </BookMarkLink>
@@ -44,7 +44,7 @@ const Documentation = ({ title = '', description = '', currentPage = undefined,
4444
};
4545

4646
const DocsTable = ({ children, columns = [], data = [] }) => {
47-
return <div className='mb-20 max-w-screen-md'>
47+
return <div className='mb-20'>
4848
<BookMarkLink id="api-documentation"> <Heading as="h6" className="mb-4">API Documentation</Heading> </BookMarkLink>
4949
<Table columns={columns} data={data} color="gray" >
5050
{children}
@@ -72,7 +72,7 @@ const Section = ({ title = '', children }) => {
7272
};
7373

7474
const UnderConstruction = ({ children }) => {
75-
return <div className='bg-gray-200 text-gray-1000 p-4 rounded-md'>
75+
return <div className='bg-gray-200 text-gray-1000 rounded-md'>
7676
<Text className="mb-2 text-gray-1000 font-bold">
7777
Docs Under Construction
7878
</Text>

docs/components/layout/Documentation/helpers/ComponentHero/ComponentHero.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const ComponentHero = ({ children, title='', codeUsage = {} }) => {
3838

3939
return <div>
4040
{title && <BookMarkLink id={title}> <Heading>{title}</Heading> </BookMarkLink>}
41-
<div className='bg-gradient-to-r from-green-50 to-gray-200 border border-gray-500 shadow-md p-10 rounded-tl-md rounded-tr-md text-black flex items-center justify-center justify-evenly overflow-x-auto'>
41+
<div className='bg-gradient-to-r from-green-50 to-gray-200 border border-gray-500 shadow-md p-10 rounded-tl-md rounded-tr-md text-black flex items-center justify-center justify-evenly overflow-x-auto '>
4242
{children}
4343
</div>
4444
<div>

0 commit comments

Comments
 (0)