How to use material-ui-popup-state - 10 common examples

To help you get started, we’ve selected a few material-ui-popup-state examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github the-rango / AntAlmanac / client / src / components / SectionTable / SectionTableBody.js View on Github external
const ScheduleAddCell = withStyles(styles)((props) => {
    const { classes, section, courseDetails, term } = props;
    const popupState = usePopupState({ variant: 'popover' });

    const closeAndAddCourse = (scheduleIndex) => {
        popupState.close();
        for (const meeting of section.meetings) {
            if (meeting.time === 'TBA') {
                openSnackbar('success', 'Online/TBA class added');
                // See Added Classes."
                break;
            }
        }

        if (scheduleIndex !== -1) {
            addCourse(section, courseDetails, term, scheduleIndex);
        }
    };
github kalmhq / kalm / frontend / src / utils / popper.ts View on Github external
export const customBindPopover = (popupState: any) => {
  const popoverProps = bindPopover(popupState);

  // @ts-ignore
  delete popoverProps.disableAutoFocus;
  // @ts-ignore
  delete popoverProps.disableEnforceFocus;
  // @ts-ignore
  delete popoverProps.disableRestoreFocus;

  return {
    ...popoverProps,
  };
};
github kalmhq / kalm / frontend / src / utils / popper.ts View on Github external
export const customBindHover = (popupState: any) => {
  const hoverProps = bindHover(popupState);

  // @ts-ignore
  delete hoverProps.disableAutoFocus;
  // @ts-ignore
  delete hoverProps.disableEnforceFocus;
  // @ts-ignore
  delete hoverProps.disableRestoreFocus;

  return {
    ...hoverProps,
  };
};
github the-rango / AntAlmanac / client / src / components / AddedCourses / AddedCoursePane.js View on Github external
{(popupState) => (
                            
                                <button color="primary">
                                    Copy Schedule
                                </button>
                                <menu>
                                    {[0, 1, 2, 3].map((index) =&gt; {
                                        return (
                                            <menuitem disabled="{"> {
                                                    console.log(index);
                                                    copySchedule(
                                                        AppStore.getCurrentScheduleIndex(),
                                                        index</menuitem></menu>
github the-rango / AntAlmanac / client / src / components / AddedCourses / AddedCoursePane.js View on Github external
{(popupState) =&gt; (
                            
                                <button color="primary">
                                    Copy Schedule
                                </button>
                                <menu>
                                    {[0, 1, 2, 3].map((index) =&gt; {
                                        return (
                                            <menuitem disabled="{"> {
                                                    console.log(index);
                                                    copySchedule(
                                                        AppStore.getCurrentScheduleIndex(),
                                                        index
                                                    );
                                                    popupState.close();
                                                }}
                                            &gt;</menuitem></menu>
github ZupIT / horusec-platform / manager / src / components / Datatable / index.tsx View on Github external
{(popupState) =&gt; (
                                      
                                        
                                          
                                        
                                        <menu>
                                          {row[column.type].map(
                                            (
                                              action: Datasource,
                                              actionId: React.Key
                                            ) =&gt; (
                                              <menuitem> {
                                                  action.function();
                                                  popupState.close();
                                                }}
                                              &gt;</menuitem></menu>
github mui-org / material-ui / docs / src / pages / components / popover / PopoverPopupState.js View on Github external
{popupState =&gt; (
        <div>
          <button color="primary">
            Open Popover
          </button>
          
            
              The content of the Popover.
            </div>
github kalmhq / kalm / frontend / src / widgets / IconWithPopover.tsx View on Github external
{(popupState) =&gt; {
          const trigger = bindTrigger(popupState);
          const popover = customBindPopover(popupState);
          return (
            <span>
              {useText ? (
                <button disabled="{disabled}" size="small">) =&gt; {
                    e.stopPropagation();
                    trigger.onClick(e);
                  }}
                &gt;</button></span>
github mui-org / material-ui / docs / src / pages / components / menus / MenuPopupState.js View on Github external
{popupState =&gt; (
        
          <button color="primary">
            Open Menu
          </button>
          <menu>
            <menuitem>Cake</menuitem>
            <menuitem>Death</menuitem>
          </menu>
        
      )}
github kalmhq / kalm / frontend / src / pages / Nodes / List.tsx View on Github external
{(popupState) =&gt; (
            &lt;&gt;
              
                How to add a new node?
              
              
                
                  Kalm is not responsible for managing the addition and deletion of nodes. You need to operate where