MM-64232 - adjust disabled styles channel settings modal (#30984)

* MM-64232 - adjust disabled styles channel settings modal

* fix styles

* adjust snapshot

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Pablo Vélez
2025-05-15 02:22:09 +02:00
коммит произвёл GitHub
родитель 1634b57dbd
Коммит 08caad3b99
5 изменённых файлов: 18 добавлений и 3 удалений

Просмотреть файл

@@ -2,7 +2,7 @@
exports[`components/TextBox should match snapshot with additional, optional props 1`] = ` exports[`components/TextBox should match snapshot with additional, optional props 1`] = `
<div <div
className="textarea-wrapper textarea-wrapper-preview" className="textarea-wrapper textarea-wrapper-preview textarea-wrapper-preview--disabled"
> >
<div <div
className="form-control custom-textarea textbox-preview-area" className="form-control custom-textarea textbox-preview-area"

Просмотреть файл

@@ -285,7 +285,7 @@ export default class Textbox extends React.PureComponent<Props> {
return ( return (
<div <div
ref={this.wrapper} ref={this.wrapper}
className={classNames('textarea-wrapper', {'textarea-wrapper-preview': this.props.preview})} className={classNames('textarea-wrapper', {'textarea-wrapper-preview': this.props.preview, 'textarea-wrapper-preview--disabled': Boolean(this.props.preview && this.props.disabled)})}
> >
<div <div
tabIndex={this.props.tabIndex} tabIndex={this.props.tabIndex}

Просмотреть файл

@@ -53,6 +53,7 @@
border: 1px solid rgba(var(--center-channel-color-rgb), 0.16); border: 1px solid rgba(var(--center-channel-color-rgb), 0.16);
border-radius: 4px; border-radius: 4px;
&:hover { &:hover {
border-color: rgba(var(--center-channel-color-rgb), 0.48); border-color: rgba(var(--center-channel-color-rgb), 0.48);
} }
@@ -62,6 +63,13 @@
box-shadow: inset 0 0 0 1px var(--button-bg); box-shadow: inset 0 0 0 1px var(--button-bg);
} }
&.textarea-wrapper-preview--disabled {
cursor: not-allowed;
opacity: 0.6;
&:hover {
border: 1px solid rgba(var(--center-channel-color-rgb), 0.16);
}
}
// forcing this styles since textarea has ohter styles that affect the post input, so keeping it here isolated inside advanced textbox // forcing this styles since textarea has ohter styles that affect the post input, so keeping it here isolated inside advanced textbox
.textarea--has-errors{ .textarea--has-errors{
border-color: var(--error-text) !important; border-color: var(--error-text) !important;

Просмотреть файл

@@ -136,6 +136,7 @@ const AdvancedTextbox = ({
hasError={hasError} hasError={hasError}
onFocus={handleFocus} onFocus={handleFocus}
onBlur={handleBlur} onBlur={handleBlur}
disabled={readOnly}
/> />
</div> </div>
{!readOnly && value.trim().length > 0 && ( {!readOnly && value.trim().length > 0 && (

Просмотреть файл

@@ -66,6 +66,12 @@
textarea { textarea {
margin-top: 6px; margin-top: 6px;
} }
.form-control[disabled] {
background: none;
cursor: not-allowed;
opacity: 0.6;
}
} }
.Input_limit-exceeded { .Input_limit-exceeded {