Page MenuHomePhabricator

D3790.diff
No OneTemporary

D3790.diff

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,28 @@
+// @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 buttonStyle = React.useMemo(
+ () => [styles.button, { backgroundColor: color }],
+ [color],
+ );
+ return <View style={buttonStyle} />;
+}
+
+const styles = StyleSheet.create({
+ button: {
+ borderRadius: 20,
+ height: 40,
+ margin: 15,
+ width: 40,
+ },
+});
+
+export default ColorSelectorButton;

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 7:33 PM (22 h, 59 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2591460
Default Alt Text
D3790.diff (813 B)

Event Timeline