-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
118 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { | ||
Button, | ||
ButtonGroup, | ||
Card, | ||
CardList, | ||
Dialog, | ||
DialogBody, | ||
DialogFooter, | ||
FormGroup, | ||
InputGroup, | ||
Menu, | ||
MenuItem, | ||
Popover | ||
} from "@blueprintjs/core"; | ||
|
||
export interface AddTargetsProps { | ||
isOpen: boolean; | ||
onClose: CloseEventHandler; | ||
} | ||
|
||
export type CloseEventHandler = () => void; | ||
|
||
export default function AddTargetsDialog({ isOpen, onClose }: AddTargetsProps) { | ||
const kindMenu = ( | ||
<Popover | ||
content={ | ||
<Menu> | ||
<MenuItem text="Native Exports" /> | ||
<MenuItem text="Native Imports" /> | ||
<MenuItem text="Objective-C" /> | ||
<MenuItem text="Swift" /> | ||
<MenuItem text="Java" /> | ||
</Menu> | ||
} | ||
placement="bottom-end" | ||
> | ||
<Button minimal={true} rightIcon="caret-down"> | ||
Native Exports | ||
</Button> | ||
</Popover> | ||
); | ||
|
||
const actions = ( | ||
<ButtonGroup> | ||
<Button onClick={onClose}>Close</Button> | ||
<Button intent="primary">Add All</Button> | ||
</ButtonGroup> | ||
); | ||
|
||
const candidates = false ? ( | ||
<FormGroup> | ||
<CardList compact={true}> | ||
<Card interactive={false} style={{"justify-content": "space-between"}}> | ||
<span>libc.so!open</span> | ||
<Button minimal={true} intent="primary" small={true} text="Add" /> | ||
</Card> | ||
<Card interactive={false} style={{"justify-content": "space-between"}}> | ||
<span>libc.so!close</span> | ||
<Button minimal={true} intent="primary" small={true} text="Add" /> | ||
</Card> | ||
<Card interactive={false} style={{"justify-content": "space-between"}}> | ||
<span>libc.so!sleep</span> | ||
<Button minimal={true} intent="primary" small={true} text="Add" /> | ||
</Card> | ||
</CardList> | ||
</FormGroup> | ||
) : null; | ||
|
||
return ( | ||
<Dialog title="Add targets" isOpen={isOpen} onClose={onClose}> | ||
<DialogBody> | ||
<FormGroup> | ||
<InputGroup rightElement={kindMenu} /> | ||
</FormGroup> | ||
{candidates} | ||
</DialogBody> | ||
<DialogFooter actions={actions} /> | ||
</Dialog> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.handlers { | ||
min-width: 140px; | ||
.handler-list { | ||
min-width: 200px; | ||
} |
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