mirror of
https://github.com/balzack/databag.git
synced 2025-05-05 07:55:15 +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: {
|
control: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
borderRadius: 8,
|
||||||
|
},
|
||||||
|
iconButton: {
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
|
borderRadius: 8,
|
||||||
},
|
},
|
||||||
button: {
|
button: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
@ -105,12 +105,12 @@ export function AudioAsset({ topicId, asset, loaded, show }: { topicId: string,
|
|||||||
)}
|
)}
|
||||||
{ status === 'playing' && (
|
{ status === 'playing' && (
|
||||||
<Surface elevation={2} style={styles.control}>
|
<Surface elevation={2} style={styles.control}>
|
||||||
<IconButton size={64} icon="pause" onPress={pause} />
|
<IconButton style={styles.iconButton} size={64} icon="pause" onPress={pause} />
|
||||||
</Surface>
|
</Surface>
|
||||||
)}
|
)}
|
||||||
{ status === 'paused' && (
|
{ status === 'paused' && (
|
||||||
<Surface elevation={2} style={styles.control}>
|
<Surface elevation={2} style={styles.control}>
|
||||||
<IconButton size={64} icon="play" onPress={play} />
|
<IconButton style={styles.iconButton} size={64} icon="play" onPress={play} />
|
||||||
</Surface>
|
</Surface>
|
||||||
)}
|
)}
|
||||||
{ state.loading && (
|
{ state.loading && (
|
||||||
|
@ -14,8 +14,12 @@ export const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
control: {
|
control: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
opacity: 0.6,
|
||||||
|
borderRadius: 8,
|
||||||
|
},
|
||||||
|
iconButton: {
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
opacity: 0.6
|
borderRadius: 8,
|
||||||
},
|
},
|
||||||
button: {
|
button: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
@ -117,12 +117,12 @@ export function VideoAsset({ topicId, asset, loaded, show }: { topicId: string,
|
|||||||
)}
|
)}
|
||||||
{ status === 'playing' && showControl && (
|
{ status === 'playing' && showControl && (
|
||||||
<Surface elevation={2} style={styles.control}>
|
<Surface elevation={2} style={styles.control}>
|
||||||
<IconButton size={64} icon="pause" onPress={pause} />
|
<IconButton style={styles.iconButton} size={64} icon="pause" onPress={pause} />
|
||||||
</Surface>
|
</Surface>
|
||||||
)}
|
)}
|
||||||
{ status === 'paused' && showControl && (
|
{ status === 'paused' && showControl && (
|
||||||
<Surface elevation={2} style={styles.control}>
|
<Surface elevation={2} style={styles.control}>
|
||||||
<IconButton size={64} icon="play" onPress={play} />
|
<IconButton style={styles.iconButton} size={64} icon="play" onPress={play} />
|
||||||
</Surface>
|
</Surface>
|
||||||
)}
|
)}
|
||||||
{ state.loading && (
|
{ state.loading && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user