mirror of
https://github.com/balzack/databag.git
synced 2025-04-23 01:55:17 +00:00
styling media play button
This commit is contained in:
parent
97f359f2da
commit
a006718174
@ -14,7 +14,11 @@ export const styles = StyleSheet.create({
|
||||
},
|
||||
control: {
|
||||
position: 'absolute',
|
||||
borderRadius: 8,
|
||||
},
|
||||
iconButton: {
|
||||
backgroundColor: 'transparent',
|
||||
borderRadius: 8,
|
||||
},
|
||||
button: {
|
||||
position: 'absolute',
|
||||
|
@ -105,12 +105,12 @@ export function AudioAsset({ topicId, asset, loaded, show }: { topicId: string,
|
||||
)}
|
||||
{ status === 'playing' && (
|
||||
<Surface elevation={2} style={styles.control}>
|
||||
<IconButton size={64} icon="pause" onPress={pause} />
|
||||
<IconButton style={styles.iconButton} size={64} icon="pause" onPress={pause} />
|
||||
</Surface>
|
||||
)}
|
||||
{ status === 'paused' && (
|
||||
<Surface elevation={2} style={styles.control}>
|
||||
<IconButton size={64} icon="play" onPress={play} />
|
||||
<IconButton style={styles.iconButton} size={64} icon="play" onPress={play} />
|
||||
</Surface>
|
||||
)}
|
||||
{ state.loading && (
|
||||
|
@ -14,8 +14,12 @@ export const styles = StyleSheet.create({
|
||||
},
|
||||
control: {
|
||||
position: 'absolute',
|
||||
opacity: 0.6,
|
||||
borderRadius: 8,
|
||||
},
|
||||
iconButton: {
|
||||
backgroundColor: 'transparent',
|
||||
opacity: 0.6
|
||||
borderRadius: 8,
|
||||
},
|
||||
button: {
|
||||
position: 'absolute',
|
||||
|
@ -117,12 +117,12 @@ export function VideoAsset({ topicId, asset, loaded, show }: { topicId: string,
|
||||
)}
|
||||
{ status === 'playing' && showControl && (
|
||||
<Surface elevation={2} style={styles.control}>
|
||||
<IconButton size={64} icon="pause" onPress={pause} />
|
||||
<IconButton style={styles.iconButton} size={64} icon="pause" onPress={pause} />
|
||||
</Surface>
|
||||
)}
|
||||
{ status === 'paused' && showControl && (
|
||||
<Surface elevation={2} style={styles.control}>
|
||||
<IconButton size={64} icon="play" onPress={play} />
|
||||
<IconButton style={styles.iconButton} size={64} icon="play" onPress={play} />
|
||||
</Surface>
|
||||
)}
|
||||
{ state.loading && (
|
||||
|
Loading…
x
Reference in New Issue
Block a user