mirror of
https://github.com/Boof2015/astra-mobile.git
synced 2026-08-19 12:14:47 +02:00
m4
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user