Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit 583305b

Browse files
committed
adjustments
1 parent 2fcb7a7 commit 583305b

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/components/EditorPane.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export const EditorPane = () => {
3737
};
3838

3939
return (
40-
<div className="absolute z-50 flex flex-col w-3/12 max-w-lg bg-white border shadow-xl rounded-xl inset-y-3 right-3 border-slate-200">
40+
<div className="absolute z-50 flex flex-col w-3/12 max-w-lg min-w-[320px] bg-white border shadow-xl rounded-xl inset-y-3 right-3 border-slate-200">
4141
<div className="px-4 py-3 border-b border-slate-300">
42-
<span className="text-xl font-medium">Edit data</span>
42+
<span className="text-xl font-medium">Link to theme</span>
4343
</div>
4444
<div className="flex flex-col flex-1 gap-2 px-4 py-4 overflow-y-auto">
4545
<p className="font-semibold text-md">Node changes</p>

src/components/editor/NodeChange.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,25 @@ export const NodeChange = ({
3939
return <></>;
4040
}
4141
const colors = typeColorMap(nodeChange.type);
42-
const propsToShow: { name: string; type: SupportedTypes }[] = [
42+
const propsToShow: {
43+
name: string;
44+
type: SupportedTypes;
45+
isLinkable: boolean;
46+
}[] = [
4347
{
4448
name: 'name',
4549
type: 'string',
50+
isLinkable: false,
4651
},
4752
{
4853
name: 'cornerRadius',
4954
type: 'number',
55+
isLinkable: true,
5056
},
5157
{
5258
name: 'fontSize',
5359
type: 'number',
60+
isLinkable: true,
5461
},
5562
];
5663
return (
@@ -78,6 +85,7 @@ export const NodeChange = ({
7885
//@ts-expect-error
7986
value={nodeChange[p.name]}
8087
type={p.type}
88+
isLinkable={p.isLinkable}
8189
linkPath={[...parentLinkPath, p.name]}
8290
/>
8391
</Prop.Root>

src/components/editor/Prop.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const Value = ({
4040
}: React.HTMLAttributes<HTMLDivElement>) => (
4141
<div
4242
className={twMerge(
43-
'flex gap-1 items-center px-2 py-0.5 rounded-md text-slate-900 bg-slate-100',
43+
'flex gap-1 h-full items-center px-2 py-0.5 rounded-md text-slate-900 bg-slate-100',
4444
className,
4545
)}
4646
{...props}
@@ -86,7 +86,6 @@ const String = ({
8686
)}
8787
{isLinkable && (
8888
<Value>
89-
...
9089
<ChevronDown
9190
size={16}
9291
onClick={() => {}}
@@ -116,7 +115,6 @@ const Number = ({
116115
)}
117116
{isLinkable && (
118117
<Value>
119-
...
120118
<ChevronDown
121119
size={16}
122120
onClick={() => {}}

0 commit comments

Comments
 (0)