Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3511901
D5751.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5751.diff
View Options
diff --git a/native/components/color-selector.react.js b/native/components/color-selector.react.js
--- a/native/components/color-selector.react.js
+++ b/native/components/color-selector.react.js
@@ -1,11 +1,12 @@
// @flow
import * as React from 'react';
-import { Text, TouchableOpacity, View, StyleSheet } from 'react-native';
+import { Text, TouchableOpacity, View } from 'react-native';
import tinycolor from 'tinycolor2';
import { selectedThreadColors } from 'lib/shared/thread-utils';
+import { useStyles } from '../themes/colors';
import ColorSelectorButton from './color-selector-button.react';
type ColorSelectorProps = {
@@ -16,6 +17,7 @@
function ColorSelector(props: ColorSelectorProps): React.Node {
const { currentColor, onColorSelected } = props;
const [pendingColor, setPendingColor] = React.useState(currentColor);
+ const styles = useStyles(unboundStyles);
const colorSelectorButtons = React.useMemo(
() =>
@@ -49,7 +51,7 @@
width: 0.75 * props.windowWidth,
},
],
- [saveButtonDisabled, pendingColor, props.windowWidth],
+ [styles.saveButton, saveButtonDisabled, pendingColor, props.windowWidth],
);
const onColorSplotchSaved = React.useCallback(() => {
@@ -72,7 +74,7 @@
);
}
-const styles = StyleSheet.create({
+const unboundStyles = {
colorButtons: {
flexDirection: 'row',
justifyContent: 'space-evenly',
@@ -98,6 +100,6 @@
color: 'white',
fontSize: 16,
},
-});
+};
export default ColorSelector;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 5:22 PM (18 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2691962
Default Alt Text
D5751.diff (1 KB)
Attached To
Mode
D5751: [native] Fix issue with `ColorSelector` header color
Attached
Detach File
Event Timeline
Log In to Comment