mirror of
https://github.com/hanzo-io/chat.git
synced 2026-10-30 18:57:58 +00:00
* feat: Camera functionality and UI changes * chore: moved all buttons to Buttons folder * chore: add back comments --------- Co-authored-by: Nikhil Kothari <[email protected]>
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import { router } from "expo-router"
|
|
import { useColorScheme } from "@hooks/useColorScheme"
|
|
import { Text } from '@components/nativewindui/Text'
|
|
import BarChart from "@assets/icons/BarChart.svg"
|
|
import { Pressable } from "react-native"
|
|
|
|
interface CreatePollButtonProps {
|
|
onSheetClose: () => void
|
|
}
|
|
|
|
const CreatePollButton = ({ onSheetClose }: CreatePollButtonProps) => {
|
|
|
|
const { colors } = useColorScheme()
|
|
const navigateToCreatePoll = () => {
|
|
router.push("./create-poll", { relativeToDirectory: true })
|
|
onSheetClose()
|
|
}
|
|
|
|
return (
|
|
<Pressable
|
|
onPress={navigateToCreatePoll}
|
|
hitSlop={10}
|
|
className='flex flex-row w-full items-center gap-2 p-2 rounded-lg ios:active:bg-linkColor'
|
|
android_ripple={{ color: 'rgba(0,0,0,0.1)', borderless: false }}>
|
|
<BarChart height={20} width={20} fill={colors.icon} />
|
|
<Text className='text-base text-foreground'>Create Poll</Text>
|
|
</Pressable>
|
|
)
|
|
}
|
|
|
|
export default CreatePollButton |