SharePrompt url hover removed

This commit is contained in:
svetlagasheva 2020-03-10 16:40:21 +02:00
parent aedf581fe0
commit 21ae30d33e
2 changed files with 6 additions and 13 deletions

View file

@ -15,18 +15,17 @@ const SharePrompt = ({ className, url }) => {
inputRef.current.select(); inputRef.current.select();
} }
}, []); }, []);
const copyToClipboard = React.useCallback((event) => { const copyToClipboard = React.useCallback(() => {
if (inputRef.current !== null) { if (inputRef.current !== null) {
inputRef.current.select(); inputRef.current.select();
document.execCommand('copy'); document.execCommand('copy');
event.target.focus();
} }
}, []); }, []);
React.useEffect(() => { React.useEffect(() => {
if (routeFocused && inputRef.current !== null) { if (routeFocused && inputRef.current !== null) {
inputRef.current.select(); inputRef.current.select();
} }
}, []); }, [routeFocused]);
return ( return (
<div className={classnames(className, styles['share-prompt-container'])}> <div className={classnames(className, styles['share-prompt-container'])}>
<div className={styles['buttons-container']}> <div className={styles['buttons-container']}>

View file

@ -61,16 +61,6 @@
margin-top: 1rem; margin-top: 1rem;
background-color: @color-surface-light2; background-color: @color-surface-light2;
&:hover {
.url-text-input {
background-color: @color-surface-light4;
}
.copy-button {
background-color: @color-accent3-light2;
}
}
.url-text-input { .url-text-input {
flex: 1; flex: 1;
align-self: stretch; align-self: stretch;
@ -91,6 +81,10 @@
padding: 1rem; padding: 1rem;
background-color: @color-accent3; background-color: @color-accent3;
&:hover {
background-color: @color-accent3-light2;
}
&:focus { &:focus {
outline-color: @color-background-dark5; outline-color: @color-background-dark5;
} }