MCPcopy Create free account
hub / github.com/Snapchat/dagger-browser / LoadManifestModal

Function LoadManifestModal

browser/src/components/LoadManifestModal.tsx:9–47  ·  view source on GitHub ↗
({ trigger, onChangeManifestUrl }: Props)

Source from the content-addressed store, hash-verified

7}
8
9export function LoadManifestModal({ trigger, onChangeManifestUrl }: Props) {
10 const inputRef = useRef<HTMLInputElement>(null);
11 return (
12 <Modal
13 actions={[
14 <Button flat modal="close" node="button" waves="green">Close</Button>,
15 <Button modal="close" className="waves-effect waves-light red lighten-2" node="button" onClick={() => {
16 onChangeManifestUrl(inputRef.current!!.value)
17 }}>Load</Button>
18 ]}
19 bottomSheet={false}
20 fixedFooter={false}
21 header="Load manifest from URL"
22 id="modal-0"
23 options={{
24 dismissible: true,
25 endingTop: '10%',
26 inDuration: 250,
27 onCloseEnd: null,
28 onCloseStart: null,
29 onOpenEnd: null,
30 onOpenStart: null,
31 opacity: 0.5,
32 outDuration: 250,
33 preventScrolling: true,
34 startingTop: '4%'
35 }}
36 trigger={trigger}
37 >
38 <form className="">
39 <input ref={inputRef} type="text" className="textbox" placeholder="Enter manifest URL" onKeyDown={(ev) => {
40 if (ev.keyCode === 13) {
41 onChangeManifestUrl(inputRef.current!!.value)
42 }
43 }} />
44 </form>
45 </Modal>
46 );
47}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected