Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3400188
D7373.id24913.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
D7373.id24913.diff
View Options
diff --git a/native/components/color-rows.react.js b/native/components/color-rows.react.js
--- a/native/components/color-rows.react.js
+++ b/native/components/color-rows.react.js
@@ -7,15 +7,16 @@
import type { SetState } from 'lib/types/hook-types.js';
import ColorSelectorButton from './color-selector-button.react.js';
+import type { ViewStyle } from '../types/styles.js';
type Props = {
+pendingColor: string,
+setPendingColor: SetState<string>,
- +outerRingSelectedColor?: string,
+ +outerRingSelectedColorStyle?: ViewStyle,
};
function ColorRows(props: Props): React.Node {
- const { pendingColor, setPendingColor, outerRingSelectedColor } = props;
+ const { pendingColor, setPendingColor, outerRingSelectedColorStyle } = props;
const colorSelectorButtons = React.useMemo(
() =>
@@ -25,10 +26,10 @@
color={color}
pendingColor={pendingColor}
setPendingColor={setPendingColor}
- outerRingSelectedColor={outerRingSelectedColor}
+ outerRingSelectedColorStyle={outerRingSelectedColorStyle}
/>
)),
- [outerRingSelectedColor, pendingColor, setPendingColor],
+ [outerRingSelectedColorStyle, pendingColor, setPendingColor],
);
const firstRow = React.useMemo(
diff --git a/native/components/color-selector-button.react.js b/native/components/color-selector-button.react.js
--- a/native/components/color-selector-button.react.js
+++ b/native/components/color-selector-button.react.js
@@ -7,15 +7,16 @@
import type { SetState } from 'lib/types/hook-types.js';
import { useStyles } from '../themes/colors.js';
+import type { ViewStyle } from '../types/styles.js';
type ColorSelectorButtonProps = {
+color: string,
+pendingColor: string,
+setPendingColor: SetState<string>,
- +outerRingSelectedColor?: string,
+ +outerRingSelectedColorStyle?: ViewStyle,
};
function ColorSelectorButton(props: ColorSelectorButtonProps): React.Node {
- const { color, pendingColor, setPendingColor, outerRingSelectedColor } =
+ const { color, pendingColor, setPendingColor, outerRingSelectedColorStyle } =
props;
const styles = useStyles(unboundStyles);
@@ -25,12 +26,12 @@
const outerRingSelectedStyle = React.useMemo(() => {
const result = [styles.outerRingSelected];
- if (outerRingSelectedColor) {
- result.push({ backgroundColor: `#${outerRingSelectedColor}` });
+ if (outerRingSelectedColorStyle) {
+ result.push(outerRingSelectedColorStyle);
}
return result;
- }, [outerRingSelectedColor, styles.outerRingSelected]);
+ }, [outerRingSelectedColorStyle, styles.outerRingSelected]);
const onPendingColorSelected = React.useCallback(() => {
setPendingColor(color);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 6:33 AM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610096
Default Alt Text
D7373.id24913.diff (2 KB)
Attached To
Mode
D7373: [native] change outerRingSelectedColor prop type from string to ViewStyle
Attached
Detach File
Event Timeline
Log In to Comment