mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-13 02:54:43 +08:00
Refactor components to use StyledButton for consistent button styling
- Replaced custom button implementations with StyledButton in various components including DetailScreen, HomeScreen, SearchScreen, and SettingsModal. - Updated button styles and behaviors to align with the new StyledButton component. - Removed the obsolete DetailButton component to streamline the codebase.
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
import React from "react";
|
||||
import { View, StyleSheet, TouchableOpacity } from "react-native";
|
||||
import { View, StyleSheet } from "react-native";
|
||||
import { ThemedText } from "@/components/ThemedText";
|
||||
import { StyledButton } from "./StyledButton";
|
||||
|
||||
interface NextEpisodeOverlayProps {
|
||||
visible: boolean;
|
||||
onCancel: () => void;
|
||||
}
|
||||
|
||||
export const NextEpisodeOverlay: React.FC<NextEpisodeOverlayProps> = ({
|
||||
visible,
|
||||
onCancel,
|
||||
}) => {
|
||||
export const NextEpisodeOverlay: React.FC<NextEpisodeOverlayProps> = ({ visible, onCancel }) => {
|
||||
if (!visible) {
|
||||
return null;
|
||||
}
|
||||
@@ -18,12 +16,13 @@ export const NextEpisodeOverlay: React.FC<NextEpisodeOverlayProps> = ({
|
||||
return (
|
||||
<View style={styles.nextEpisodeOverlay}>
|
||||
<View style={styles.nextEpisodeContent}>
|
||||
<ThemedText style={styles.nextEpisodeTitle}>
|
||||
即将播放下一集...
|
||||
</ThemedText>
|
||||
<TouchableOpacity style={styles.nextEpisodeButton} onPress={onCancel}>
|
||||
<ThemedText style={styles.nextEpisodeButtonText}>取消</ThemedText>
|
||||
</TouchableOpacity>
|
||||
<ThemedText style={styles.nextEpisodeTitle}>即将播放下一集...</ThemedText>
|
||||
<StyledButton
|
||||
text="取消"
|
||||
onPress={onCancel}
|
||||
style={styles.nextEpisodeButton}
|
||||
textStyle={styles.nextEpisodeButtonText}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
@@ -48,10 +47,8 @@ const styles = StyleSheet.create({
|
||||
marginBottom: 10,
|
||||
},
|
||||
nextEpisodeButton: {
|
||||
backgroundColor: "#333",
|
||||
padding: 8,
|
||||
paddingHorizontal: 15,
|
||||
borderRadius: 5,
|
||||
},
|
||||
nextEpisodeButtonText: {
|
||||
fontSize: 14,
|
||||
|
||||
Reference in New Issue
Block a user