@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.
2 lines (1 loc) • 1.09 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@mui/material/Button"),t=require("@mui/material/Typography"),o=require("@mui/icons-material/ArrowDropDown"),i=require("@mui/icons-material/ArrowDropUp");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(r),n=a(t),s=a(o),u=a(i);exports.OrgButton=r=>{const{open:t,showArrowIcon:o,selectedOrgOption:i,onClick:a,sx:c,...d}=r;return e.jsx(n.default,{variant:"body2",component:"span",children:e.jsx(l.default,{"data-testid":"NexusOrgButton-root",className:"NexusOrgButton-root",endIcon:o?t?e.jsx(u.default,{sx:e=>({color:"text.primary",...e.applyStyles("dark",{color:"inherit"})})}):e.jsx(s.default,{sx:e=>({color:"text.primary",...e.applyStyles("dark",{color:"inherit"})})}):e.jsx(e.Fragment,{}),onClick:a,disabled:!o,sx:[...Array.isArray(c)?c:[c]],...d,children:e.jsx(n.default,{sx:{fontSize:14,fontWeight:700,lineHeight:1.6,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textAlign:"left",color:"text.primary"},children:i?.label})})})};