Make whole username clickable in UsernameLinkModalBody
This commit is contained in:
parent
2dd2de4d0f
commit
317138d545
2 changed files with 28 additions and 18 deletions
|
@ -71,8 +71,6 @@
|
||||||
|
|
||||||
&__username {
|
&__username {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
|
||||||
gap: 4px;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-block: 12px 2px;
|
margin-block: 12px 2px;
|
||||||
|
|
||||||
|
@ -85,10 +83,12 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__copy {
|
&__copy__button {
|
||||||
@include button-reset;
|
display: flex;
|
||||||
@include button-focus-outline;
|
flex-direction: row;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
|
i {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -100,6 +100,10 @@
|
||||||
var(--text-color)
|
var(--text-color)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include button-reset;
|
||||||
|
@include button-focus-outline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -808,15 +808,21 @@ export function UsernameLinkModalBody({
|
||||||
>
|
>
|
||||||
<div className={`${CLASS}__card__qr`}>{linkImage}</div>
|
<div className={`${CLASS}__card__qr`}>{linkImage}</div>
|
||||||
<div className={`${CLASS}__card__username`}>
|
<div className={`${CLASS}__card__username`}>
|
||||||
{!showColors && (
|
{showColors ? (
|
||||||
|
<div className={`${CLASS}__card__username__text`}>{username}</div>
|
||||||
|
) : (
|
||||||
<button
|
<button
|
||||||
className={classnames(`${CLASS}__card__username__copy`)}
|
className={`${CLASS}__card__username__copy__button`}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={onCopyUsername}
|
onClick={onCopyUsername}
|
||||||
aria-label={i18n('icu:UsernameLinkModalBody__copy')}
|
aria-label={i18n('icu:UsernameLinkModalBody__copy')}
|
||||||
/>
|
>
|
||||||
|
<i />
|
||||||
|
<div className={`${CLASS}__card__username__text`}>
|
||||||
|
{username}
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
)}
|
)}
|
||||||
<div className={`${CLASS}__card__username__text`}>{username}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue