Page MenuHomePhabricator

D6259.id20928.diff
No OneTemporary

D6259.id20928.diff

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

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)

Event Timeline