UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

3 lines (2 loc) 1.11 kB
"use client"; "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/Box"),l=require("country-flag-icons/react/3x2"),r=require("clsx"),a=require("../../locales/index.js"),i=require("./locale.json.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=s(t),n=s(l),u=s(r);exports.CountrySelectItem=t=>{const{option:l}=t,r=n.default[l.code.toUpperCase()],s=a.useTranslate(i.default);return e.jsxs(o.default,{component:"div",sx:{display:"flex",alignItem:"center"},"data-testid":`NexusCountrySelect-item-${l.code}`,className:u.default("NexusCountrySelectItem-root","NexusCountrySelect-item"),children:[e.jsx(o.default,{sx:{width:30,mr:8,height:28,display:"flex",alignItems:"center",flex:"0 0 auto","& > svg":{width:"100%",height:"auto"}},children:e.jsx(r,{})}),e.jsx(o.default,{sx:{display:"flex",alignItems:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"calc(100% - 38px)"},title:"string"==typeof l.label?s(l.label):l.label,children:"string"==typeof l.label?s(l.label):l.label})]})};