Skip to content

Commit 43e677f

Browse files
committed
Merge branch 'select-primitive-t1' of https://github.com/GoldGroove06/radui-fork into select-primitive-t1
2 parents 9a1929e + 90f8640 commit 43e677f

File tree

28 files changed

+716
-72
lines changed

28 files changed

+716
-72
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use client'
2+
3+
import Button from "@radui/ui/Button"
4+
5+
const StarUs = () => {
6+
return <Button onClick={() => window.open("https://github.com/rad-ui/ui", "_blank")}>Star us on GitHub</Button>
7+
}
8+
9+
export default StarUs;

docs/app/docs/contributing/contributing-to-rad-ui/page.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import Button from "@radui/ui/Button"
1+
22
import contributingToRadUiMetadata from "./seo"
33

44
export const metadata = contributingToRadUiMetadata
5+
import StarUs from "./StarUs"
56

67
# Contributing to Rad UI
78

@@ -11,7 +12,7 @@ If you're unsure about what to contribute on, feel free to take your time explor
1112

1213
You can also support us by starring the repository on GitHub.
1314

14-
<Button >Star us on GitHub</Button>
15+
<StarUs />
1516

1617
## Join the Discord
1718

docs/app/docs/contributing/setting-up-dev-environment/page.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ First, navigate to the docs directory:
5151
cd docs
5252
```
5353

54+
Then install the dependencies:
55+
56+
```bash
57+
npm install
58+
```
59+
5460
Then start the Next.js development server:
5561

5662
```bash

docs/app/docs/layout.tsx

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,35 @@
33
import PageDetails from "@/components/seo/PageDetails";
44
import Navigation from '@/components/navigation/Navigation';
55
import EditPageOnGithub from "@/components/docsHelpers/EditPageOnGithub";
6-
6+
import ScrollArea from "@radui/ui/ScrollArea"
77

88
type Doc = {
9-
children: React.ReactNode;
9+
children: React.ReactNode;
1010
};
1111

1212

1313
const Layout = ({ children }: Doc) => {
1414
return (
15-
<div className= "md:flex max-h-screen overflow-y-auto">
16-
<div className='md:flex hidden overflow-y-auto'>
17-
<Navigation />
15+
<div className="md:flex md:flex-row md:items-stretch" style={{ height: "calc(100vh - 57px)" }}>
16+
<div className="flex-none flex-col items-stretch h-full md:flex hidden">
17+
<Navigation />
1818
</div>
19-
<div className='text-gray-1000 flex flex-col overflow-y-auto flex-1' id="docs-content">
20-
<div className=' p-4 md:mx-auto md:max-w-[1440px] w-full'>
21-
<div className="w-full max-w-screen-lg mx-auto">
22-
<PageDetails />
23-
{children}
24-
<EditPageOnGithub />
25-
</div>
2619

27-
</div>
20+
<div className='text-gray-1000 flex flex-col flex-1 overflow-hidden' id="docs-content">
21+
<ScrollArea.Root style={{ width: "100%", height: "100%" }}>
22+
<ScrollArea.Viewport style={{ height: "100%" }}>
23+
<div className=' p-4 md:mx-auto md:max-w-[1440px] w-full'>
24+
<div className="w-full max-w-screen-lg mx-auto">
25+
<PageDetails />
26+
{children}
27+
<EditPageOnGithub />
28+
</div>
29+
</div>
30+
</ScrollArea.Viewport>
31+
<ScrollArea.Scrollbar orientation='vertical' >
32+
<ScrollArea.Thumb />
33+
</ScrollArea.Scrollbar>
34+
</ScrollArea.Root>
2835
</div>
2936
</div>
3037
)

docs/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const JoinCommunity = () => {
7171
}
7272

7373
const DesignedBy = () => {
74-
return <div className="my-10 text-gray-1000 text-right px-4">
74+
return <div className="my-10 text-gray-700 text-right px-4">
7575
<div>
7676
<Text>Website designed by <Link href="https://carmenw.design/" target="_blank" rel="noopener noreferrer">Carmen</Link> and <Link href="https://maryandesign.net/" target="_blank" rel="noopener noreferrer">Maryan</Link>.</Text>
7777
</div>

docs/components/Main/NavBar/NavBarContext.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
'use client'
12
import { createContext } from "react";
23

34
type NavBarContextType = {

docs/components/Main/NavBar/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use client"
1+
22

33
import NavRoot from "./helpers/NavRoot"
44
import Navigation from "@/components/navigation/Navigation"
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
'use client'
2+
import ScrollArea from '@radui/ui/ScrollArea';
3+
14
const FullHeightScroll = ({ children, scrollable = true, className='', ...props }) => {
25
// An important layout component that allows for full height scrolling
3-
return <div
4-
className={` ${className} ${scrollable?' overflow-y-auto overflow-x-hidden':''}`} {...props} style={{
5-
6-
}}>
7-
<div className="max-w-[1440px] mx-auto">
8-
{children}
9-
</div>
10-
</div>
6+
return <ScrollArea.Root style={{ height: "100%", width: "100%" }}>
7+
<ScrollArea.Viewport style={{ height: "100%" }}>
8+
<div className={` ${className} ${scrollable?'':''}`} {...props}>
9+
<div className="max-w-[1440px] mx-auto">
10+
{children}
11+
</div>
12+
</div>
13+
</ScrollArea.Viewport>
14+
<ScrollArea.Scrollbar orientation='vertical'>
15+
<ScrollArea.Thumb />
16+
</ScrollArea.Scrollbar>
17+
</ScrollArea.Root>
1118
}
1219

1320
export default FullHeightScroll;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import NavItem from './NavItem'
2+
3+
const Category = ({ categoryItem, pathname, setIsDocsNavOpen }) => {
4+
return <div className="px-2">
5+
<div className='px-2 py-2 font-medium text-xs text-gray-1000'>{categoryItem.title}</div>
6+
<ul>
7+
{categoryItem.items.map((item, itemKey) => {
8+
return <li key={itemKey} onClick={() => setIsDocsNavOpen(false)}>
9+
<NavItem item={item} path={pathname} setIsDocsNavOpen={setIsDocsNavOpen} />
10+
</li>
11+
})}
12+
</ul>
13+
</div>
14+
}
15+
16+
17+
export default Category;

docs/components/navigation/NavItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use client"
1+
22

33
import Link from 'next/link'
44

0 commit comments

Comments
 (0)