Skip to content

Commit

Permalink
disable feature toggles on main toggle (#38678)
Browse files Browse the repository at this point in the history
  • Loading branch information
CGastrell authored Aug 2, 2024
1 parent a2a9a9a commit 362ff62
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Jetpack AI Breve: disable feature toggles on main toggle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
margin-bottom: 24px;

.components-checkbox-control {
&__input {
&__input:not(:disabled) {
@include features-colors( ( 'border-color' ) );
&:checked {
@include features-colors( ( 'background-color' ) );
}
}
&__input:disabled {
border-color: #ddd;
background-color: #ddd;
}
}

.components-toggle-control {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ const Controls = ( { blocks, disabledFeatures } ) => {
<div className="feature-checkboxes-container">
{ features.map( feature => (
<CheckboxControl
className={ isProofreadEnabled ? '' : 'is-disabled' }
disabled={ ! isProofreadEnabled }
data-type={ feature.config.name }
key={ feature.config.name }
label={ feature.config.title }
Expand Down

0 comments on commit 362ff62

Please sign in to comment.