Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33312953
D7316.1768816954.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D7316.1768816954.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
@@ -11,11 +11,10 @@
type Props = {
+pendingColor: string,
+setPendingColor: SetState<string>,
- +outerRingSelectedColor?: string,
};
function ColorRows(props: Props): React.Node {
- const { pendingColor, setPendingColor, outerRingSelectedColor } = props;
+ const { pendingColor, setPendingColor } = props;
const colorSelectorButtons = React.useMemo(
() =>
@@ -25,10 +24,9 @@
color={color}
pendingColor={pendingColor}
setPendingColor={setPendingColor}
- outerRingSelectedColor={outerRingSelectedColor}
/>
)),
- [outerRingSelectedColor, pendingColor, setPendingColor],
+ [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
@@ -12,34 +12,22 @@
+color: string,
+pendingColor: string,
+setPendingColor: SetState<string>,
- +outerRingSelectedColor?: string,
};
function ColorSelectorButton(props: ColorSelectorButtonProps): React.Node {
- const { color, pendingColor, setPendingColor, outerRingSelectedColor } =
- props;
+ const { color, pendingColor, setPendingColor } = props;
const styles = useStyles(unboundStyles);
const colorSplotchStyle = React.useMemo(() => {
return [styles.button, { backgroundColor: `#${color}` }];
}, [color, styles.button]);
- const outerRingSelectedStyle = React.useMemo(() => {
- const result = [styles.outerRingSelected];
- if (outerRingSelectedColor) {
- result.push({ backgroundColor: `#${outerRingSelectedColor}` });
- }
-
- return result;
- }, [outerRingSelectedColor, styles.outerRingSelected]);
-
const onPendingColorSelected = React.useCallback(() => {
setPendingColor(color);
}, [setPendingColor, color]);
const isSelected = tinycolor.equals(pendingColor, color);
-
return (
- <View style={isSelected ? outerRingSelectedStyle : styles.outerRing}>
+ <View style={isSelected ? styles.outerRingSelected : styles.outerRing}>
<TouchableOpacity
style={colorSplotchStyle}
onPress={onPendingColorSelected}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 10:02 AM (12 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5955752
Default Alt Text
D7316.1768816954.diff (2 KB)
Attached To
Mode
D7316: Revert "[native] introduce outerRingSelectedColor prop to ColorSelectorButton and ColorRows"
Attached
Detach File
Event Timeline
Log In to Comment