UNPKG

@equinor/mad-core

Version:

Core library for the Mobile App Delivery team

28 lines (25 loc) 911 B
import { useLanguage } from "./chunk-WWNTKXBS.js"; // src/components/screens/language/components/SelectLanguageCellGroup.tsx import React from "react"; import { Cell, Typography, Radio } from "@equinor/mad-components"; var SelectLanguageCellGroup = ({ selectedLanguageCodeDraft, setSelectedLanguageCodeDraft }) => { const { supportedLanguages } = useLanguage(); const onPress = (code) => () => setSelectedLanguageCodeDraft(code); return /* @__PURE__ */ React.createElement(Cell.Group, null, supportedLanguages.map((language) => /* @__PURE__ */ React.createElement( Cell, { key: language.code, rightAdornment: /* @__PURE__ */ React.createElement(Radio, { checked: language.code === selectedLanguageCodeDraft }), onPress: onPress(language.code) }, /* @__PURE__ */ React.createElement(Typography, null, language.name) ))); }; export { SelectLanguageCellGroup };