Files
hipmi-mobile/screens/Voting/BoxDetailPublishSection.tsx
Bagasbanuna02 befbd1a47d Voting:
Add:
- ComponentDetailDataSection : Tampilan judul, deskripsi, batas waktu
- BoxDetailHistorySection
- (user)/voting/[id]/history

Fix:
Perbaikan component detail data pada:
- screens/Voting/BoxDetailSection.tsx
-  screens/Voting/BoxDetailPublishSection.tsx
- screens/Voting/BoxDetailContribution.tsx

# No Issue
2025-07-29 10:50:24 +08:00

48 lines
1.3 KiB
TypeScript

import {
BoxWithHeaderSection,
ButtonCustom,
Spacing,
StackCustom,
TextCustom
} from "@/components";
import { RadioCustom, RadioGroup } from "@/components/Radio/RadioCustom";
import { useState } from "react";
import { View } from "react-native";
import { Voting_ComponentDetailDataSection } from "./ComponentDetailDataSection";
export function Voting_BoxDetailPublishSection({
headerAvatar,
}: {
headerAvatar?: React.ReactNode;
}) {
const [value, setValue] = useState<any | number>("");
return (
<>
<BoxWithHeaderSection>
{headerAvatar ? headerAvatar : <Spacing />}
<StackCustom gap={"lg"}>
<Voting_ComponentDetailDataSection />
<View>
<TextCustom bold size="small">
Pilihan :
</TextCustom>
<RadioGroup value={value} onChange={setValue}>
{Array.from({ length: 4 }).map((_, i) => (
<View key={i}>
<RadioCustom
label={`Pilihan ${i + 1}`}
value={`Pilihan ${i + 1}`}
/>
</View>
))}
</RadioGroup>
</View>
<ButtonCustom onPress={() => console.log("vote")}>Vote</ButtonCustom>
</StackCustom>
</BoxWithHeaderSection>
</>
);
}