feat: removes custom label container for now

This commit is contained in:
Mark Mankarious
2023-08-08 17:55:54 +01:00
parent cfee9033bf
commit 194b4eda2d
5 changed files with 3 additions and 14 deletions

View File

@@ -115,7 +115,6 @@ export const Node = ({ node, iconUrl }: Props) => {
connectorDotSize={5 * zoom}
>
{node.label && <MarkdownLabel label={node.label} />}
{node.labelComponent}
</LabelContainer>
</Box>
<Box

View File

@@ -71,7 +71,6 @@ export const CustomNode = () => {
{
id: 'server',
label: 'Requests per minute',
labelComponent: <CustomLabel />,
labelHeight: 40,
iconId: 'server',
position: {
@@ -82,7 +81,6 @@ export const CustomNode = () => {
{
id: 'database',
label: 'Transactions',
labelComponent: <CustomLabel />,
labelHeight: 40,
iconId: 'server',
position: {

View File

@@ -5,16 +5,10 @@ import {
connectorInput,
groupInput
} from 'src/validation/sceneItems';
import { sceneInput } from 'src/validation/scene';
export type IconInput = z.infer<typeof iconInput>;
export type NodeInput = z.infer<typeof nodeInput> & {
labelComponent?: React.ReactNode;
};
export type NodeInput = z.infer<typeof nodeInput>;
export type ConnectorInput = z.infer<typeof connectorInput>;
export type GroupInput = z.infer<typeof groupInput>;
export type SceneInput = {
icons: IconInput[];
nodes: NodeInput[];
connectors: ConnectorInput[];
groups: GroupInput[];
};
export type SceneInput = z.infer<typeof sceneInput>;

View File

@@ -24,7 +24,6 @@ export interface Node {
labelHeight: number;
position: Coords;
isSelected: boolean;
labelComponent?: React.ReactNode;
}
export interface Connector {

View File

@@ -16,7 +16,6 @@ export const nodeInputToNode = (nodeInput: NodeInput): Node => {
type: SceneItemTypeEnum.NODE,
id: nodeInput.id,
label: nodeInput.label ?? NODE_DEFAULTS.label,
labelComponent: nodeInput.labelComponent,
labelHeight: nodeInput.labelHeight ?? NODE_DEFAULTS.labelHeight,
color: nodeInput.color ?? NODE_DEFAULTS.color,
iconId: nodeInput.iconId,