mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix snapshots
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
1bac2ce592
commit
c9a59adf35
@ -4208,7 +4208,7 @@ exports[`cluster/namespaces - edit namespace from new tab when navigating to nam
|
|||||||
Kind:
|
Kind:
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="badge clickable interactive"
|
class="badge"
|
||||||
>
|
>
|
||||||
Namespace
|
Namespace
|
||||||
</div>
|
</div>
|
||||||
@ -4216,7 +4216,7 @@ exports[`cluster/namespaces - edit namespace from new tab when navigating to nam
|
|||||||
Name:
|
Name:
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="badge clickable interactive"
|
class="badge"
|
||||||
>
|
>
|
||||||
some-name
|
some-name
|
||||||
</div>
|
</div>
|
||||||
@ -4224,7 +4224,7 @@ exports[`cluster/namespaces - edit namespace from new tab when navigating to nam
|
|||||||
Namespace:
|
Namespace:
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="badge clickable interactive"
|
class="badge"
|
||||||
>
|
>
|
||||||
default
|
default
|
||||||
</div>
|
</div>
|
||||||
@ -7856,7 +7856,7 @@ exports[`cluster/namespaces - edit namespace from new tab when navigating to nam
|
|||||||
Kind:
|
Kind:
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="badge clickable interactive"
|
class="badge"
|
||||||
>
|
>
|
||||||
Namespace
|
Namespace
|
||||||
</div>
|
</div>
|
||||||
@ -7864,7 +7864,7 @@ exports[`cluster/namespaces - edit namespace from new tab when navigating to nam
|
|||||||
Name:
|
Name:
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="badge clickable interactive"
|
class="badge"
|
||||||
>
|
>
|
||||||
some-name
|
some-name
|
||||||
</div>
|
</div>
|
||||||
@ -7872,7 +7872,7 @@ exports[`cluster/namespaces - edit namespace from new tab when navigating to nam
|
|||||||
Namespace:
|
Namespace:
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="badge clickable interactive"
|
class="badge"
|
||||||
>
|
>
|
||||||
default
|
default
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export const Badge = withTooltip(observer(({
|
|||||||
const elem = useRef<HTMLDivElement>(null);
|
const elem = useRef<HTMLDivElement>(null);
|
||||||
const elemHasBeenSet = useRef(false);
|
const elemHasBeenSet = useRef(false);
|
||||||
const [isExpanded, setIsExpanded] = useState(false);
|
const [isExpanded, setIsExpanded] = useState(false);
|
||||||
const [isExpandable, setIsExpandable] = useState(expandable);
|
const [isExpandable, setIsExpandable] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (elemHasBeenSet.current) {
|
if (elemHasBeenSet.current) {
|
||||||
@ -54,11 +54,9 @@ export const Badge = withTooltip(observer(({
|
|||||||
elemHasBeenSet.current = true;
|
elemHasBeenSet.current = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsExpandable((
|
const { clientWidth = 0, scrollWidth = 0 } = elem.current ?? {};
|
||||||
expandable && elem.current
|
|
||||||
? elem.current.clientWidth < elem.current.scrollWidth
|
setIsExpandable(expandable && (clientWidth < scrollWidth));
|
||||||
: false
|
|
||||||
));
|
|
||||||
}, [expandable, elem.current]);
|
}, [expandable, elem.current]);
|
||||||
|
|
||||||
const onMouseUp = action(() => {
|
const onMouseUp = action(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user