-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285 from orppst/264-InvestigatorManagement
Workflow to prevent deletion or removal of last PI
- Loading branch information
Showing
5 changed files
with
262 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Button, Tooltip } from '@mantine/core'; | ||
import { IconUserPentagon } from '@tabler/icons-react'; | ||
import { | ||
ClickButtonInterfaceProps | ||
} from './buttonInterfaceProps.tsx'; | ||
import { ReactElement } from 'react'; | ||
import { CLOSE_DELAY, ICON_SIZE, OPEN_DELAY } from '../constants.tsx'; | ||
|
||
|
||
/** | ||
* creates a swap role button. | ||
* | ||
* @param {ClickButtonInterfaceProps} props the button inputs. | ||
* @return {ReactElement} the dynamic html for the delete button | ||
* @constructor | ||
*/ | ||
export default | ||
function SwapRoleButton(props: ClickButtonInterfaceProps): ReactElement { | ||
return ( | ||
<Tooltip | ||
position={props.toolTipLabelPosition} | ||
openDelay={OPEN_DELAY} | ||
closeDelay={CLOSE_DELAY} | ||
label={props.toolTipLabel} | ||
> | ||
<Button | ||
rightSection={<IconUserPentagon size={ICON_SIZE}/>} | ||
color={"green.5"} | ||
variant={props.variant ?? "subtle"} | ||
onClick={props.onClick ?? props.onClickEvent} | ||
disabled={props.disabled} | ||
//type="submit" | ||
> | ||
{props.label ?? 'Swap Role'} | ||
</Button> | ||
</Tooltip> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.