MM-63800 Add label tag for create account checkbox (#30799)

* added proper label tag for checkbox

* fix linting issues

* updated cursor on checkbox label

* remove uneccessary class on span

* resolve lint error

* Update screenshots

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
This commit is contained in:
Matthew Birtch 2025-04-25 12:35:25 -04:00 committed by GitHub
parent 80b61ad79b
commit 34fb9adbc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 13 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 KiB

After

Width:  |  Height:  |  Size: 507 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

After

Width:  |  Height:  |  Size: 507 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 168 KiB

View file

@ -7,7 +7,12 @@
margin-top: 24px;
margin-bottom: 32px;
label {
cursor: pointer;
}
.text {
padding-top: 2px;
margin-left: 8px;
color: rgba(var(--center-channel-color-rgb), 0.75);
font-size: 12px;
@ -17,6 +22,7 @@
.header {
display: block;
margin-bottom: 8px;
color: var(--center-channel-color);
}
}

View file

@ -21,11 +21,17 @@ function CheckInput(props: Props) {
<div className='check-input'>
<input
{...rest}
id={id}
aria-label={ariaLabel}
data-testid={id}
type='checkbox'
/>
<span className='text'>{text}</span>
<label
className='text'
htmlFor={id}
>
<span>{text}</span>
</label>
</div>
);
}