[MA-50]: Provide fieldsets for groups of form controls (#29905)
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b333902bef
Коммит
1999ff9263
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -364,13 +364,22 @@ export default function ChannelNotificationsModal(props: Props) {
|
||||
handleClose={handleHide}
|
||||
/>
|
||||
<main className='channel-notifications-settings-modal__body'>
|
||||
<ModalSection
|
||||
title={formatMessage({
|
||||
id: 'channel_notifications.muteAndIgnore',
|
||||
defaultMessage: 'Mute or ignore',
|
||||
})}
|
||||
content={muteOrIgnoreSectionContent}
|
||||
/>
|
||||
<fieldset aria-labelledby='channel-notifications-settings-modal-legend'>
|
||||
<ModalSection
|
||||
title={
|
||||
<legend
|
||||
style={{all: 'unset'}}
|
||||
id='channel-notifications-settings-modal-legend'
|
||||
>
|
||||
{formatMessage({
|
||||
id: 'channel_notifications.muteAndIgnore',
|
||||
defaultMessage: 'Mute or ignore',
|
||||
})}
|
||||
</legend>
|
||||
}
|
||||
content={muteOrIgnoreSectionContent}
|
||||
/>
|
||||
</fieldset>
|
||||
{desktopAndMobileNotificationSectionContent}
|
||||
{props.collapsedReplyThreads &&
|
||||
<>
|
||||
|
||||
@@ -60,12 +60,16 @@
|
||||
&__fieldset-checkbox-ctr {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
&__fieldset-checkbox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 0;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
gap: 8px;
|
||||
|
||||
@@ -37,22 +37,26 @@ export default function CheckboxSettingItem({
|
||||
descriptionAboveContent = false,
|
||||
}: Props) {
|
||||
const content = (
|
||||
<fieldset
|
||||
<div
|
||||
key={inputFieldData.name}
|
||||
className='mm-modal-generic-section-item__fieldset-checkbox-ctr'
|
||||
>
|
||||
<label className='mm-modal-generic-section-item__fieldset-checkbox'>
|
||||
<input
|
||||
className='mm-modal-generic-section-item__input-checkbox'
|
||||
data-testid={inputFieldData.dataTestId}
|
||||
type='checkbox'
|
||||
name={inputFieldData.name}
|
||||
checked={inputFieldValue}
|
||||
onChange={(e) => handleChange(e.target.checked)}
|
||||
/>
|
||||
<input
|
||||
className='mm-modal-generic-section-item__input-checkbox'
|
||||
data-testid={inputFieldData.dataTestId}
|
||||
type='checkbox'
|
||||
name={inputFieldData.name}
|
||||
id={inputFieldData.name.replaceAll(' ', '-')}
|
||||
checked={inputFieldValue}
|
||||
onChange={(e) => handleChange(e.target.checked)}
|
||||
/>
|
||||
<label
|
||||
htmlFor={inputFieldData.name.replaceAll(' ', '-')}
|
||||
className='mm-modal-generic-section-item__fieldset-checkbox'
|
||||
>
|
||||
{inputFieldTitle}
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Ссылка в новой задаче
Block a user