vhc-portalindex
import { View, StyleSheet, Platform } from "react-native";
import Button from "@/components/button/";
import useToast from "@/components/toast";
import Text from "@/components/text";
import Divider from "@/components/divider";
import { SegmentedButton } from "@/components/segmented-button";
import { Icon } from "react-native-paper";
import { useState } from "react";
const HomePage = () => {
const toast = useToast();
const [active, setActive] = useState(0);
return (
<View style={{}}>
<Text variant="display-1" numberOfLines={3} color="primary-500">
Home Page
</Text>
<Button
title="Hello Native"
onPress={() => {
toast("Something went wrong please try again later!", "error");
}}
// start={<Icon size={15} source="download" />}
/>
<SegmentedButton active={active} onChange={setActive}>
<Button variant="secondary" title="Audio" onPress={() => setActive(0)} />
<Button variant="secondary" title="Video" onPress={() => setActive(1)} />
</SegmentedButton>
<Divider color={"success-600"} />
{/* <Icon variant="arrow-down" /> */}
</View>
);
};
const styles = StyleSheet.create({
buttonContainer: {
...(Platform.OS === 'web' ? { width: 'auto', alignSelf: 'flex-start' } : {})
}
});
export default HomePage;
Comments
Post a Comment