Page MenuHomePhabricator

D5751.id18907.diff
No OneTemporary

D5751.id18907.diff

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

Mime Type
text/plain
Expires
Sun, Dec 22, 10:49 PM (12 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2691962
Default Alt Text
D5751.id18907.diff (1 KB)

Event Timeline