Add iOS Dark Mode
This commit is contained in:
@@ -1,25 +1,35 @@
|
||||
import React from 'react';
|
||||
import { DynamicColorIOS, StyleSheet, ScrollView, Platform, PlatformColor } from 'react-native';
|
||||
import MediaControls from './components/MediaControls';
|
||||
import ProgressBar from './components/ProgressBar';
|
||||
import NowPlaying from './components/NowPlaying';
|
||||
import styled from 'styled-components/native';
|
||||
import Queue from './components/Queue';
|
||||
|
||||
const Container = styled.ScrollView`
|
||||
background-color: #fff;
|
||||
`;
|
||||
|
||||
const containerStyle = {
|
||||
padding: 25,
|
||||
};
|
||||
const styles = StyleSheet.create({
|
||||
outer: {
|
||||
...Platform.select({
|
||||
ios: {
|
||||
color: PlatformColor('label'),
|
||||
backgroundColor: PlatformColor('systemBackground'),
|
||||
},
|
||||
android: {
|
||||
color: PlatformColor('?android:attr/textColorPrimary'),
|
||||
backgroundColor: PlatformColor('?android:attr/backgroundTint'),
|
||||
}
|
||||
}),
|
||||
},
|
||||
inner: {
|
||||
padding: 25,
|
||||
}
|
||||
});
|
||||
|
||||
export default function Player() {
|
||||
return (
|
||||
<Container contentContainerStyle={containerStyle}>
|
||||
<ScrollView contentContainerStyle={styles.inner} style={styles.outer}>
|
||||
<NowPlaying />
|
||||
<MediaControls />
|
||||
<ProgressBar />
|
||||
<Queue />
|
||||
</Container>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user