github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/web/src/ShareSnapshotModal.stories.tsx (about) 1 import React from "react" 2 import ReactModal from "react-modal" 3 import ShareSnapshotModal from "./ShareSnapshotModal" 4 import { nResourceView } from "./testdata" 5 6 ReactModal.setAppElement("#root") 7 8 let handleClose = () => console.log("close") 9 10 const offlineSnapshot = () => { 11 const anchorEl: HTMLElement | null = document.body.querySelector("#root") 12 return ( 13 <ShareSnapshotModal 14 getSnapshot={() => ({ view: nResourceView(1) })} 15 handleClose={handleClose} 16 isOpen={true} 17 dialogAnchor={anchorEl} 18 /> 19 ) 20 } 21 22 export default { 23 title: "New UI/Shared/ShareSnapshotModal", 24 } 25 26 export const OfflineSnapshot = offlineSnapshot