This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,30 @@
// Metro module 11375 (f11376).
import { useCallback } from "react";
import usePollDurationOptions from "../usePollDurationOptions";
import { AccessibilityAnnouncer } from "../../../_bundle/Module3902";
import ActionSheetActionCreators from "../../action_sheet/native/ActionSheetActionCreators";
import { TableRadioGroup } from "../../../design/components/TableRow/native/TableRadioGroup.native";
import { intl, t } from "../../../intl/index.native";
import { TableRadioRow } from "../../../design/components/TableRow/native/TableRadioRow.native";
import { ActionSheet } from "../../../design/components/Sheet/native/ActionSheet.native";
const PollDurationRadioGroup = function PollDurationRadioGroup(props) {
const { selectedDuration, onChange } = props;
const pollDurationOptions = usePollDurationOptions();
let c18788_1 = pollDurationOptions;
const callback = useCallback((a0) => {
onChange(a0);
AccessibilityAnnouncer.announce(c18788_1[a0]);
ActionSheetActionCreators.hideActionSheet();
}, [pollDurationOptions, onChange]);
return <TableRadioGroup title={intl.string(t["0ZStp9"])} hasIcons={false} onChange={callback} defaultValue={selectedDuration}>
{Object.entries(pollDurationOptions).map((item) => {
const [key, label] = item;
return <TableRadioRow key={key} value={parseInt(key)} label={label} />;
})}
</TableRadioGroup>;
};
export default function PollDurationActionSheet(props) {
return <ActionSheet>
<PollDurationRadioGroup selectedDuration={props.selectedDuration} onChange={props.onChange} />
</ActionSheet>;
};