Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3493008
D6259.id20928.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
D6259.id20928.diff
View Options
diff --git a/native/components/pill.react.js b/native/components/pill.react.js
--- a/native/components/pill.react.js
+++ b/native/components/pill.react.js
@@ -11,6 +11,7 @@
+backgroundColor: string,
+icon?: React.Node,
+roundCorners?: { +left: boolean, +right: boolean },
+ +fontSize?: number,
};
function Pill(props: Props): React.Node {
const styles = useStyles(unboundStyles);
@@ -38,9 +39,11 @@
[props.backgroundColor],
);
+ const fontSize = props.fontSize ?? 16;
+
const combinedTextStyles = React.useMemo(
- () => [styles.label, { color: textColor }],
- [styles.label, textColor],
+ () => [styles.label, { color: textColor, fontSize }],
+ [fontSize, styles.label, textColor],
);
const icon = props.icon ? (
@@ -66,7 +69,6 @@
paddingVertical: 4,
},
label: {
- fontSize: 16,
fontWeight: 'bold',
},
icon: {
diff --git a/native/components/thread-pill.react.js b/native/components/thread-pill.react.js
--- a/native/components/thread-pill.react.js
+++ b/native/components/thread-pill.react.js
@@ -9,14 +9,16 @@
type Props = {
+threadInfo: ThreadInfo,
+roundCorners?: { +left: boolean, +right: boolean },
+ +fontSize?: number,
};
function ThreadPill(props: Props): React.Node {
- const { threadInfo, roundCorners } = props;
+ const { threadInfo, roundCorners, fontSize } = props;
return (
<Pill
backgroundColor={`#${threadInfo.color}`}
label={threadInfo.uiName}
roundCorners={roundCorners}
+ fontSize={fontSize}
/>
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 1:56 AM (20 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679132
Default Alt Text
D6259.id20928.diff (1 KB)
Attached To
Mode
D6259: [native] Add fontSize option to Pill and ThreadPill components
Attached
Detach File
Event Timeline
Log In to Comment