Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3378092
D4050.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D4050.diff
View Options
diff --git a/web/components/enum-settings-option-info.css b/web/components/enum-settings-option-info.css
--- a/web/components/enum-settings-option-info.css
+++ b/web/components/enum-settings-option-info.css
@@ -9,6 +9,6 @@
color: var(--notification-settings-option-invalid-color);
}
-div.optionContainerSelected div.optionInfoInvalid {
+div.optionInfoInvalidSelected {
color: var(--notification-settings-option-invalid-selected-color);
}
diff --git a/web/components/enum-settings-option-info.react.js b/web/components/enum-settings-option-info.react.js
--- a/web/components/enum-settings-option-info.react.js
+++ b/web/components/enum-settings-option-info.react.js
@@ -7,19 +7,22 @@
import css from './enum-settings-option-info.css';
type Props = {
+ +optionSelected: boolean,
+valid: boolean,
+children: React.Node,
};
function EnumSettingsOptionInfo(props: Props): React.Node {
- const { valid, children } = props;
+ const { valid, children, optionSelected } = props;
const optionInfoClasses = React.useMemo(
() =>
- classnames(css.optionInfo, {
+ classnames({
+ [css.optionInfo]: true,
[css.optionInfoInvalid]: !valid,
+ [css.optionInfoInvalidSelected]: !valid && optionSelected,
}),
- [valid],
+ [valid, optionSelected],
);
const icon = React.useMemo(
diff --git a/web/components/enum-settings-option.react.js b/web/components/enum-settings-option.react.js
--- a/web/components/enum-settings-option.react.js
+++ b/web/components/enum-settings-option.react.js
@@ -24,11 +24,15 @@
const descriptionItems = React.useMemo(
() =>
statements.map(({ statement, isStatementValid }) => (
- <EnumSettingsOptionInfo key={statement} valid={isStatementValid}>
+ <EnumSettingsOptionInfo
+ key={statement}
+ optionSelected={selected}
+ valid={isStatementValid}
+ >
{statement}
</EnumSettingsOptionInfo>
)),
- [statements],
+ [selected, statements],
);
const optionContainerClasses = React.useMemo(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 8:54 AM (21 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2593482
Default Alt Text
D4050.diff (2 KB)
Attached To
Mode
D4050: [web] Pass `optionSelected` from `EnumSettingsOption` to `EnumSettingsOptionInfo`
Attached
Detach File
Event Timeline
Log In to Comment