@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) • 808 B
JavaScript
import{jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@mui/material/Button";import e from"@mui/material/Typography";import i from"@mui/icons-material/ArrowDropDown";import n from"@mui/icons-material/ArrowDropUp";const a=a=>{const{open:l,showArrowIcon:m,selectedOrgOption:p,onClick:s,sx:c,...d}=a;return r(e,{variant:"body2",component:"span",children:r(t,{"data-testid":"NexusOrgButton-root",className:"NexusOrgButton-root",endIcon:m?r(l?n:i,{sx:r=>({color:"text.primary",...r.applyStyles("dark",{color:"inherit"})})}):r(o,{}),onClick:s,disabled:!m,sx:[...Array.isArray(c)?c:[c]],...d,children:r(e,{sx:{fontSize:14,fontWeight:700,lineHeight:1.6,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textAlign:"left",color:"text.primary"},children:p?.label})})})};export{a as OrgButton};