-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add connect modal for notebook and shell tasks [MD-404] (#9545)
add "Connect" button and modal to display info for shell and notebook tasks
- Loading branch information
1 parent
b9ea173
commit 83b9a8b
Showing
4 changed files
with
94 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import CodeSample from 'hew/CodeSample'; | ||
import { Modal } from 'hew/Modal'; | ||
import { Label } from 'hew/Typography'; | ||
import React from 'react'; | ||
|
||
export interface Props { | ||
title?: string; | ||
fields: TaskConnectField[]; | ||
} | ||
|
||
export interface TaskConnectField { | ||
label: string; | ||
value: string; | ||
} | ||
|
||
const TaskConnectModalComponent: React.FC<Props> = ({ fields, title }: Props) => { | ||
return ( | ||
<Modal size="medium" title={title ?? 'Connect to Task'}> | ||
<> | ||
{fields.map((lv) => { | ||
return ( | ||
<> | ||
<Label>{lv.label}</Label> | ||
<CodeSample text={lv.value} /> | ||
</> | ||
); | ||
})} | ||
</> | ||
</Modal> | ||
); | ||
}; | ||
export default TaskConnectModalComponent; |
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