github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/web/src/UpdateDialog.stories.tsx (about)

     1  import React from "react"
     2  import { FakeInterfaceVersionProvider } from "./InterfaceVersion"
     3  import UpdateDialog from "./UpdateDialog"
     4  
     5  function onRequestClose() {
     6    console.log("onRequestClose")
     7  }
     8  
     9  export default {
    10    title: "Legacy UI/UpdateDialog",
    11  }
    12  
    13  export const Dialog = () => (
    14    <FakeInterfaceVersionProvider>
    15      <UpdateDialog
    16        open={true}
    17        onClose={onRequestClose}
    18        anchorEl={document.body}
    19        showUpdate={true}
    20        suggestedVersion={"0.18.1"}
    21        isNewInterface={false}
    22      />
    23    </FakeInterfaceVersionProvider>
    24  )
    25  
    26  export const DialogNoUpdate = () => (
    27    <FakeInterfaceVersionProvider>
    28      <UpdateDialog
    29        open={true}
    30        onClose={onRequestClose}
    31        anchorEl={document.body}
    32        showUpdate={false}
    33        suggestedVersion={"0.18.1"}
    34        isNewInterface={false}
    35      />
    36    </FakeInterfaceVersionProvider>
    37  )