Adjust Expander > Params layout (#8617)

* Adjust Expander > Params layout

* Re-adjust width
This commit is contained in:
Jaco 2022-12-24 09:26:27 +02:00 committed by GitHub
parent 5360b6da9e
commit 9bfe7eb1ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -149,11 +149,12 @@ function Call ({ callName, children, className = '', labelHash, labelSignature,
}
export default React.memo(styled(Call)`
.hash .ui--Static {
.ui--Labelled.hash .ui--Static {
overflow: hidden;
text-overflow: ellipsis;
word-break: unset;
word-wrap: unset;
white-space: nowrap;
}
.ui--Extrinsic--toplevel {

View File

@ -155,6 +155,10 @@ export default React.memo(styled(Expander)`
justify-content: end;
}
}
.ui--Params.withBorder {
padding-left: 0.25rem;
}
}
&.isHeader {

View File

@ -9,6 +9,7 @@ import Labelled from './Labelled';
interface Props {
children?: React.ReactNode;
className?: string;
copyValue?: string;
defaultValue?: unknown;
help?: React.ReactNode;
isDisabled?: boolean;
@ -22,7 +23,7 @@ interface Props {
withLabel?: boolean;
}
function Static ({ children, className = '', defaultValue, help, isFull, isHidden, isSmall, label, value, withCopy, withLabel }: Props): React.ReactElement<Props> {
function Static ({ children, className = '', copyValue, defaultValue, help, isFull, isHidden, isSmall, label, value, withCopy, withLabel }: Props): React.ReactElement<Props> {
return (
<Labelled
className={className}
@ -38,7 +39,7 @@ function Static ({ children, className = '', defaultValue, help, isFull, isHidde
{children}
</div>
{withCopy && (
<CopyButton value={value || defaultValue} />
<CopyButton value={copyValue || value || defaultValue} />
)}
</Labelled>
);