Skip to content

Commit

Permalink
Fix editor
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchas116 committed Apr 27, 2023
1 parent c859112 commit 2a253f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/editor/src/views/inspector/style/TextPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export const TextPane: React.FC = observer(function TextPane() {
};
}
return {
value: value[0],
unit: value[1],
value: Number.parseFloat(value),
unit: "%",
};
}}
allowedUnits={["%"]}
Expand All @@ -122,7 +122,7 @@ export const TextPane: React.FC = observer(function TextPane() {
value === undefined
? null
: value.unit === "%"
? [value.value, "%"]
? `${value.value}%`
: value.value;
}}
/>
Expand All @@ -136,8 +136,8 @@ export const TextPane: React.FC = observer(function TextPane() {
};
}
return {
value: value[0],
unit: value[1],
value: Number.parseFloat(value),
unit: "%",
};
}}
allowedUnits={["%"]}
Expand All @@ -146,7 +146,7 @@ export const TextPane: React.FC = observer(function TextPane() {
value === undefined
? 0
: value.unit === "%"
? [value.value, "%"]
? `${value.value}%`
: value.value;
}}
/>
Expand Down

0 comments on commit 2a253f1

Please sign in to comment.