generated from idealjs/mono-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
361 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { button, menuItem } from "@idealjs/camphora-styled"; | ||
import clsx from "clsx"; | ||
import React, { PropsWithChildren } from "react"; | ||
|
||
interface IProps { | ||
className?: string; | ||
} | ||
|
||
const MenuItem = (props: PropsWithChildren<IProps>) => { | ||
const { className, children } = props; | ||
return <li className={clsx(className, menuItem)}>{children}</li>; | ||
}; | ||
|
||
export default MenuItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { menu, paper } from "@idealjs/camphora-styled"; | ||
import clsx from "clsx"; | ||
import React, { PropsWithChildren } from "react"; | ||
|
||
interface IProps { | ||
className?: string; | ||
style?: React.CSSProperties; | ||
} | ||
|
||
const Menu = (props: PropsWithChildren<IProps>) => { | ||
const { className, children, style } = props; | ||
|
||
return ( | ||
<ul className={clsx(className, menu)} style={style}> | ||
{children} | ||
</ul> | ||
); | ||
}; | ||
|
||
export default Menu; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from "react"; | ||
|
||
import Preview from "../Preview"; | ||
import Menu from "."; | ||
import MenuItem from "./MenuItem"; | ||
|
||
const page = () => { | ||
return ( | ||
<div> | ||
<Preview style={{ height: "300px" }}> | ||
<Menu style={{ width: "124px" }}> | ||
<MenuItem> | ||
Trees | ||
<Menu style={{ width: "124px" }}> | ||
<MenuItem>🌳 Deciduous</MenuItem> | ||
<MenuItem>🌲 Evergreen</MenuItem> | ||
<MenuItem>🌴 Palm</MenuItem> | ||
</Menu> | ||
</MenuItem> | ||
<MenuItem> | ||
Vegetables | ||
<Menu style={{ width: "124px" }}> | ||
<MenuItem>🍆 Eggplant</MenuItem> | ||
<MenuItem>🥔 Potato</MenuItem> | ||
<MenuItem>🥕 Carrot</MenuItem> | ||
</Menu> | ||
</MenuItem> | ||
<MenuItem> | ||
Fruits | ||
<Menu style={{ width: "124px" }}> | ||
<MenuItem>🍇 Grapes</MenuItem> | ||
<MenuItem>🍊 Tangerine</MenuItem> | ||
<MenuItem>🍋 Lemon</MenuItem> | ||
</Menu> | ||
</MenuItem> | ||
</Menu> | ||
</Preview> | ||
</div> | ||
); | ||
}; | ||
|
||
export default page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { preview } from "@idealjs/camphora-styled"; | ||
import clsx from "clsx"; | ||
import React, { CSSProperties, PropsWithChildren } from "react"; | ||
|
||
interface IProps { | ||
className?: string; | ||
style?: CSSProperties; | ||
} | ||
|
||
const Preview = (props: PropsWithChildren<IProps>) => { | ||
const { className, children, style } = props; | ||
return ( | ||
<div className={clsx(preview, className)} style={style}> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import { | ||
button, | ||
buttonGhost, | ||
dropdown, | ||
dropdownContent, | ||
menu, | ||
menuItem, | ||
} from "@idealjs/camphora-styled"; | ||
import clsx from "clsx"; | ||
import getConfig from "next/config"; | ||
import Link from "next/link"; | ||
import React from "react"; | ||
|
||
import { selectedButtonStyle } from "./style.css"; | ||
|
||
const { publicRuntimeConfig } = getConfig(); | ||
const version = publicRuntimeConfig?.version; | ||
|
||
const VersionDropdown = () => { | ||
return ( | ||
<div className={dropdown}> | ||
<div | ||
tabIndex={0} | ||
className={clsx(button, buttonGhost, selectedButtonStyle)} | ||
> | ||
{version} | ||
</div> | ||
<ul tabIndex={0} className={clsx(dropdownContent, menu)}> | ||
<li> | ||
<Link href={"/docs/changelog"} className={clsx(menuItem)}> | ||
<svg | ||
width="14" | ||
height="14" | ||
viewBox="0 0 48 48" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M5.81836 6.72729V14H13.0911" | ||
stroke="currentColor" | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
></path> | ||
<path | ||
d="M4 24C4 35.0457 12.9543 44 24 44V44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C16.598 4 10.1351 8.02111 6.67677 13.9981" | ||
stroke="currentColor" | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
></path> | ||
<path | ||
d="M24.005 12L24.0038 24.0088L32.4832 32.4882" | ||
stroke="currentColor" | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
></path> | ||
</svg> | ||
Changelog | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href={"/docs/roadmap"} className={clsx(menuItem)}> | ||
<svg | ||
width="14" | ||
height="14" | ||
viewBox="0 0 48 48" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M17 12L4 6V36L17 42L31 36L44 42V12L31 6L17 12Z" | ||
fill="none" | ||
stroke="currentColor" | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
></path> | ||
<path | ||
d="M31 6V36" | ||
stroke="currentColor" | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
></path> | ||
<path | ||
d="M17 12V42" | ||
stroke="currentColor" | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
></path> | ||
<path | ||
d="M10.5 9L17 12L31 6L37.5 9" | ||
stroke="currentColor" | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
></path> | ||
<path | ||
d="M10.5 39L17 42L31 36L37.5 39" | ||
stroke="currentColor" | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
></path> | ||
</svg> | ||
Roadmap | ||
</Link> | ||
</li> | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
|
||
export default VersionDropdown; |
Oops, something went wrong.