github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/webapp/javascript/components/Modals/ModalWithInput/index.tsx (about)

     1  import ShowModal, { ShowModalParams } from '@webapp/ui/Modals';
     2  
     3  type ModalWithInputParams = Pick<
     4    ShowModalParams,
     5    | 'title'
     6    | 'input'
     7    | 'inputPlaceholder'
     8    | 'confirmButtonText'
     9    | 'onConfirm'
    10    | 'inputValue'
    11    | 'type'
    12    | 'validationMessage'
    13  >;
    14  
    15  async function showModalWithInput(params: ModalWithInputParams) {
    16    return ShowModal({
    17      ...params,
    18    });
    19  }
    20  
    21  export default showModalWithInput;