Ensure CopyButton is not read-only (#3477)
This commit is contained in:
parent
d2282d2dba
commit
dc6817d8af
@ -20,6 +20,8 @@ interface Props {
|
||||
value: string;
|
||||
}
|
||||
|
||||
const NOOP = () => undefined;
|
||||
|
||||
function CopyButton ({ children, className, icon = 'copy', isAddress = false, value }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { queueAction } = useContext(StatusContext);
|
||||
@ -48,6 +50,7 @@ function CopyButton ({ children, className, icon = 'copy', isAddress = false, va
|
||||
<Button
|
||||
className='icon-button show-on-hover'
|
||||
icon={icon}
|
||||
onClick={NOOP}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -57,12 +60,6 @@ function CopyButton ({ children, className, icon = 'copy', isAddress = false, va
|
||||
}
|
||||
|
||||
export default React.memo(styled(CopyButton)`
|
||||
cursor: copy;
|
||||
|
||||
button.u.ui--Icon.primary.button.icon-button {
|
||||
cursor: copy;
|
||||
}
|
||||
|
||||
.copySpan {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user