Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from curtislarson/feat/navbar-improvements
feat: some meta tag improvements, update the navbar, other small fixes
- Loading branch information
Showing
9 changed files
with
113 additions
and
34 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface IconProps { | ||
src: string; | ||
tooltip?: string; | ||
} | ||
|
||
export default function Icon({ src, tooltip }: IconProps) { | ||
if (tooltip) { | ||
return ( | ||
<div className={`tooltip tooltip-bottom normal-case`} data-tip={tooltip}> | ||
<img src={src} className="h-8 w-8" /> | ||
</div> | ||
); | ||
} | ||
return <img src={src} className="h-8 w-8" />; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import Icon from "./Icon"; | ||
|
||
export type NavbarItemProps = { | ||
href: string; | ||
/** @default "left" */ | ||
align?: "left" | "right"; | ||
active?: boolean; | ||
} & ( | ||
| { | ||
text: string; | ||
} | ||
| { image: string; tooltip?: string } | ||
); | ||
|
||
export default function NavbarItem(props: NavbarItemProps) { | ||
if ("image" in props) { | ||
return ( | ||
<li> | ||
<a href={props.href}> | ||
<Icon src={props.image} tooltip={props.tooltip} /> | ||
</a> | ||
</li> | ||
); | ||
} else { | ||
return ( | ||
<li> | ||
<a href={props.href} className={`btn normal-case ${props.active ? "btn-outline btn-primary" : "btn-ghost"}`}> | ||
{props.text} | ||
</a> | ||
</li> | ||
); | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.