This commit is contained in:
Boof2015
2026-06-19 13:19:37 -04:00
parent 978d001db9
commit bc687dfe87
145 changed files with 4685 additions and 197 deletions
+6 -1
View File
@@ -20,8 +20,10 @@ export function Badge({ label }: { label: string }) {
*/
export function FormatBadges({
track,
wrap = true,
}: {
track: Pick<Track, 'format' | 'bitDepth' | 'sampleRate'>;
wrap?: boolean;
}) {
const labels: string[] = [];
if (track.format) labels.push(track.format.toUpperCase());
@@ -31,7 +33,7 @@ export function FormatBadges({
if (labels.length === 0) return null;
return (
<View style={styles.row}>
<View style={[styles.row, !wrap && styles.rowNoWrap]}>
{labels.map((label) => (
<Badge key={label} label={label} />
))}
@@ -45,6 +47,9 @@ const styles = StyleSheet.create({
flexWrap: 'wrap',
gap: spacing.xs,
},
rowNoWrap: {
flexWrap: 'nowrap',
},
badge: {
backgroundColor: colors.glassBg,
borderColor: colors.glassBorder,