Fixed Share button position and icon
This commit is contained in:
parent
501bcaeb65
commit
89e7469032
6 changed files with 30 additions and 19 deletions
|
|
@ -4,13 +4,20 @@ import { nodeIconsLucide } from "../../utils/styleUtils";
|
|||
|
||||
const ForwardedIconComponent = forwardRef(
|
||||
(
|
||||
{ name, className, iconColor, stroke, id = "" }: IconComponentProps,
|
||||
{
|
||||
name,
|
||||
className,
|
||||
iconColor,
|
||||
stroke,
|
||||
strokeWidth,
|
||||
id = "",
|
||||
}: IconComponentProps,
|
||||
ref
|
||||
) => {
|
||||
const TargetIcon = nodeIconsLucide[name] ?? nodeIconsLucide["unknown"];
|
||||
|
||||
const style = {
|
||||
strokeWidth: 1.5,
|
||||
strokeWidth: strokeWidth ?? 1.5,
|
||||
...(stroke && { stroke: stroke }),
|
||||
...(iconColor && { color: iconColor, stroke: stroke }),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ export default function ShareModal({
|
|||
>
|
||||
<span className="pr-2">Share</span>
|
||||
<IconComponent
|
||||
name="Share"
|
||||
name="Forward"
|
||||
className="h-6 w-6 pl-1 text-foreground"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -193,14 +193,15 @@ export default function ExtraSidebar(): JSX.Element {
|
|||
<button
|
||||
disabled={!hasApiKey || !validApiKey || !hasStore}
|
||||
className={classNames(
|
||||
"extra-side-bar-buttons gap-2 text-sm",
|
||||
"extra-side-bar-buttons gap-1.5 text-sm font-semibold",
|
||||
!hasApiKey || !validApiKey || !hasStore
|
||||
? "button-disable cursor-default text-muted-foreground"
|
||||
: ""
|
||||
)}
|
||||
>
|
||||
<IconComponent
|
||||
name="Share"
|
||||
name="Forward"
|
||||
strokeWidth={2.5}
|
||||
className={classNames(
|
||||
"side-bar-button-size",
|
||||
!hasApiKey || !validApiKey || !hasStore
|
||||
|
|
@ -231,6 +232,19 @@ export default function ExtraSidebar(): JSX.Element {
|
|||
return (
|
||||
<div className="side-bar-arrangement">
|
||||
<div className="side-bar-buttons-arrangement">
|
||||
{hasStore && (
|
||||
<ShadTooltip
|
||||
content={
|
||||
!hasApiKey || !validApiKey
|
||||
? "Please review your API key."
|
||||
: "Share"
|
||||
}
|
||||
side="top"
|
||||
styleClasses="cursor-default"
|
||||
>
|
||||
<div className="side-bar-button">{ModalMemo}</div>
|
||||
</ShadTooltip>
|
||||
)}
|
||||
<div className="side-bar-button">
|
||||
<ShadTooltip content="Import" side="top">
|
||||
<button
|
||||
|
|
@ -300,19 +314,6 @@ export default function ExtraSidebar(): JSX.Element {
|
|||
</ShadTooltip>
|
||||
)}
|
||||
</div>
|
||||
{hasStore && (
|
||||
<ShadTooltip
|
||||
content={
|
||||
!hasApiKey || !validApiKey
|
||||
? "Please review your API key."
|
||||
: "Share"
|
||||
}
|
||||
side="top"
|
||||
styleClasses="cursor-default"
|
||||
>
|
||||
<div className="side-bar-button">{ModalMemo}</div>
|
||||
</ShadTooltip>
|
||||
)}
|
||||
</div>
|
||||
<Separator />
|
||||
<div className="side-bar-search-div-placement">
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ export default function NodeToolbarComponent({
|
|||
>
|
||||
<div className="flex">
|
||||
<IconComponent
|
||||
name="Share"
|
||||
name="Forward"
|
||||
className="relative top-0.5 mr-2 h-4 w-4"
|
||||
/>{" "}
|
||||
Share{" "}
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ export type IconComponentProps = {
|
|||
iconColor?: string;
|
||||
onClick?: () => void;
|
||||
stroke?: string;
|
||||
strokeWidth?: number;
|
||||
id?: string;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import {
|
|||
FileUp,
|
||||
Fingerprint,
|
||||
FolderPlus,
|
||||
Forward,
|
||||
Gift,
|
||||
GitBranchPlus,
|
||||
GitFork,
|
||||
|
|
@ -358,6 +359,7 @@ export const nodeIconsLucide: iconsType = {
|
|||
Minimize2,
|
||||
Maximize2,
|
||||
SaveAll,
|
||||
Forward,
|
||||
Share2,
|
||||
Share,
|
||||
GitBranchPlus,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue