Stop compound prop label being shifted when it's too long
Fixed it by removing the fixed width. This is unnecessary since there's no value on the ribght to accommodate.
This commit is contained in:
parent
41fb7de533
commit
2efd9e9c7a
2 changed files with 1 additions and 5 deletions
|
@ -734,7 +734,6 @@ const defaultNumberNudgeFn: NumberNudgeFn = ({
|
||||||
magnitude,
|
magnitude,
|
||||||
}) => {
|
}) => {
|
||||||
const {range} = config
|
const {range} = config
|
||||||
console.log(deltaX, deltaFraction, config)
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!config.nudgeMultiplier &&
|
!config.nudgeMultiplier &&
|
||||||
|
|
|
@ -50,7 +50,6 @@ const Padding = styled.div`
|
||||||
padding-left: ${rowIndentationFormulaCSS};
|
padding-left: ${rowIndentationFormulaCSS};
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: calc(100% - var(--right-width));
|
|
||||||
`
|
`
|
||||||
|
|
||||||
const PropName = deriver(styled.div<{isHighlighted: PropHighlighted}>`
|
const PropName = deriver(styled.div<{isHighlighted: PropHighlighted}>`
|
||||||
|
@ -179,13 +178,11 @@ function DetailCompoundPropEditor<
|
||||||
if (!collapsedMap.has(globalPointerPath)) {
|
if (!collapsedMap.has(globalPointerPath)) {
|
||||||
collapsedMap.set(globalPointerPath, new Atom(isVectorProp(propConfig)))
|
collapsedMap.set(globalPointerPath, new Atom(isVectorProp(propConfig)))
|
||||||
}
|
}
|
||||||
}, [])
|
}, [globalPointerPath, propConfig])
|
||||||
|
|
||||||
const box = collapsedMap.get(globalPointerPath)
|
const box = collapsedMap.get(globalPointerPath)
|
||||||
|
|
||||||
const isCollapsed = usePrism(() => {
|
const isCollapsed = usePrism(() => {
|
||||||
const box = collapsedMap.get(globalPointerPath)
|
|
||||||
|
|
||||||
return box ? val(box.pointer) : isVectorProp(propConfig)
|
return box ? val(box.pointer) : isVectorProp(propConfig)
|
||||||
}, [box])
|
}, [box])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue