fix(GenericNode): change icon name from "Ungroup" to "group_components" to match the corresponding icon component
fix(GradientSparkles): add new icon component "GradientUngroup" to render the "Ungroup" icon with gradient stroke fix(ComponentsComponent): add TODO comment to create a placeholder for when there are no components created yet fix(styleUtils): import and use the new "GradientUngroup" icon component for the "group_components" icon in nodeIconsLucide
This commit is contained in:
parent
9cf6e93fe5
commit
a368991d39
4 changed files with 26 additions and 5 deletions
|
|
@ -177,7 +177,7 @@ export default function GenericNode({
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name={data.node?.flow ? "Ungroup" : name}
|
name={data.node?.flow ? "group_components" : name}
|
||||||
className={
|
className={
|
||||||
"generic-node-icon " +
|
"generic-node-icon " +
|
||||||
(!showNode ? "absolute inset-x-6 h-12 w-12" : "")
|
(!showNode ? "absolute inset-x-6 h-12 w-12" : "")
|
||||||
|
|
@ -213,13 +213,13 @@ export default function GenericNode({
|
||||||
takeSnapshot();
|
takeSnapshot();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="generic-node-tooltip-div pr-3 text-primary">
|
<div className="generic-node-tooltip-div pr-2 text-primary">
|
||||||
{data.node?.display_name}
|
{data.node?.display_name}
|
||||||
</div>
|
</div>
|
||||||
{data.node?.flow && (
|
{data.node?.flow && (
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name="Pencil"
|
name="Pencil"
|
||||||
className="h-5 w-5 text-ring"
|
className="h-4 w-4 text-ring"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -60,3 +60,19 @@ export const GradientGroup = (props) => {
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const GradientUngroup = (props) => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<svg width="0" height="0" style={{ position: "absolute" }}>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="grad4" x1="0%" y1="0%" x2="100%" y2="0%">
|
||||||
|
<stop className="gradient-start" offset="0%" />
|
||||||
|
<stop className="gradient-end" offset="100%" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
<ForwardedIconComponent name="Ungroup" stroke="url(#grad4)" {...props} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ export default function ComponentsComponent({
|
||||||
<div className="flex w-full flex-col gap-4">
|
<div className="flex w-full flex-col gap-4">
|
||||||
{!isLoading && data.length === 0 ? (
|
{!isLoading && data.length === 0 ? (
|
||||||
<div className="w-full text-center">
|
<div className="w-full text-center">
|
||||||
You haven't created any {name}s yet.
|
{/* TODO: create placeholder */}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="grid w-full gap-4 md:grid-cols-2 lg:grid-cols-2">
|
<div className="grid w-full gap-4 md:grid-cols-2 lg:grid-cols-2">
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,11 @@ import { EvernoteIcon } from "../icons/Evernote";
|
||||||
import { FBIcon } from "../icons/FacebookMessenger";
|
import { FBIcon } from "../icons/FacebookMessenger";
|
||||||
import { GitBookIcon } from "../icons/GitBook";
|
import { GitBookIcon } from "../icons/GitBook";
|
||||||
import { GoogleIcon } from "../icons/Google";
|
import { GoogleIcon } from "../icons/Google";
|
||||||
import { GradientInfinity, GradientSave } from "../icons/GradientSparkles";
|
import {
|
||||||
|
GradientInfinity,
|
||||||
|
GradientSave,
|
||||||
|
GradientUngroup,
|
||||||
|
} from "../icons/GradientSparkles";
|
||||||
import { HuggingFaceIcon } from "../icons/HuggingFace";
|
import { HuggingFaceIcon } from "../icons/HuggingFace";
|
||||||
import { IFixIcon } from "../icons/IFixIt";
|
import { IFixIcon } from "../icons/IFixIt";
|
||||||
import { MetaIcon } from "../icons/Meta";
|
import { MetaIcon } from "../icons/Meta";
|
||||||
|
|
@ -276,6 +280,7 @@ export const nodeIconsLucide: iconsType = {
|
||||||
WikipediaQueryRun: SvgWikipedia,
|
WikipediaQueryRun: SvgWikipedia,
|
||||||
WolframAlphaQueryRun: SvgWolfram,
|
WolframAlphaQueryRun: SvgWolfram,
|
||||||
custom_components: GradientInfinity,
|
custom_components: GradientInfinity,
|
||||||
|
group_components: GradientUngroup,
|
||||||
custom: Edit,
|
custom: Edit,
|
||||||
Trash2,
|
Trash2,
|
||||||
Boxes,
|
Boxes,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue