mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-08 13:05:08 +09:00
nitpicks
This commit is contained in:
1 parent
f3c384d8cf
commit
7f6128f0db
1 file changed
+6
-4
@@ -123,9 +123,11 @@ const Label = styled(
|
||||
},
|
||||
position: {
|
||||
outside: {
|
||||
marginTop: "-$4",
|
||||
top: "-$4",
|
||||
},
|
||||
inside: {
|
||||
top: 0,
|
||||
},
|
||||
inside: {},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -134,7 +136,7 @@ const Label = styled(
|
||||
export const useOutline = (currentInstance: Instance) => {
|
||||
const { element, type } = useElement(currentInstance) ?? {};
|
||||
const style = useStyle(element);
|
||||
const { ref: labelRefCallback, position } = useLabelPosition();
|
||||
const { ref: labelRef, position } = useLabelPosition();
|
||||
|
||||
const component = element?.dataset?.component;
|
||||
|
||||
@@ -147,7 +149,7 @@ export const useOutline = (currentInstance: Instance) => {
|
||||
|
||||
return createPortal(
|
||||
<Outline state={type} style={style} className={darkTheme}>
|
||||
<Label state={type} position={position} ref={labelRefCallback}>
|
||||
<Label state={type} position={position} ref={labelRef}>
|
||||
<Icon width="1em" height="1em" />
|
||||
{primitive.label}
|
||||
</Label>
|
||||
|
||||
Reference in new issue
Block a user