Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3390874
D3790.id11685.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
838 B
Referenced Files
None
Subscribers
None
D3790.id11685.diff
View Options
diff --git a/native/components/color-selector-button.react.js b/native/components/color-selector-button.react.js
new file mode 100644
--- /dev/null
+++ b/native/components/color-selector-button.react.js
@@ -0,0 +1,27 @@
+// @flow
+
+import * as React from 'react';
+import { View, StyleSheet } from 'react-native';
+
+type ColorSelectorButtonProps = {
+ color: string,
+};
+
+function ColorSelectorButton(props: ColorSelectorButtonProps): React.Node {
+ const { color } = props;
+ const buttonBackgroundColor = React.useMemo(() => {
+ return { backgroundColor: color };
+ }, [color]);
+ return <View style={[styles.button, buttonBackgroundColor]} />;
+}
+
+const styles = StyleSheet.create({
+ button: {
+ borderRadius: 100,
+ height: 40,
+ margin: 15,
+ width: 40,
+ },
+});
+
+export default ColorSelectorButton;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 1:18 AM (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2603133
Default Alt Text
D3790.id11685.diff (838 B)
Attached To
Mode
D3790: [native] Introduce `ColorSelectorButton` component
Attached
Detach File
Event Timeline
Log In to Comment