Download packages/app/src/components/dialog-usage-exceeded.tsx from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/components/dialog-usage-exceeded.tsx
- Command line
-
hf download hf://SaylorTwift/opencode/packages/app/src/components/dialog-usage-exceeded.tsx
-
curl -L -o dialog-usage-exceeded.tsx https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/components/dialog-usage-exceeded.tsx
1.32 kB
| import { usePlatform } from "@/context/platform" | |
| import { useLanguage } from "@/context/language" | |
| import { Button } from "@opencode-ai/ui/button" | |
| import { useDialog } from "@opencode-ai/ui/context/dialog" | |
| import { Dialog } from "@opencode-ai/ui/dialog" | |
| import { JSX } from "solid-js" | |
| export type DialogGoUpsellProps = { | |
| title: string | |
| description: JSX.Element | |
| link?: string | |
| actionLabel: string | |
| onClose?: (dontShowAgain?: boolean) => void | |
| } | |
| export function DialogUsageExceeded(props: DialogGoUpsellProps) { | |
| const dialog = useDialog() | |
| const language = useLanguage() | |
| const platform = usePlatform() | |
| const runAction = () => { | |
| if (props.link) platform.openExternal(props.link) | |
| props.onClose?.() | |
| dialog.close() | |
| } | |
| const dismiss = () => { | |
| props.onClose?.(true) | |
| dialog.close() | |
| } | |
| return ( | |
| <Dialog title={props.title} description={props.description} fit> | |
| <div class="flex flex-col gap-4 pl-6 pr-2.5 pb-3"> | |
| <div class="flex justify-end gap-2"> | |
| <Button variant="ghost" size="large" onClick={dismiss}> | |
| {language.t("dialog.usageExceeded.dontShowAgain")} | |
| </Button> | |
| <Button variant="primary" size="large" onClick={runAction}> | |
| {props.actionLabel} | |
| </Button> | |
| </div> | |
| </div> | |
| </Dialog> | |
| ) | |
| } | |