mirror of
https://github.com/ritz078/transform.git
synced 2026-11-20 16:22:53 +03:00
* update-depenencies * fixes * fixes * fixes * fixes * multiple versions of tailwind css * multiple versions of tailwind css
31 lines
783 B
TypeScript
31 lines
783 B
TypeScript
import ConversionPanel from "@components/ConversionPanel";
|
|
import * as React from "react";
|
|
import { useCallback } from "react";
|
|
import request from "@utils/request";
|
|
import { Alert } from "evergreen-ui";
|
|
|
|
export default function TypescriptToFlow() {
|
|
const transformer = useCallback(
|
|
({ value }) => request("/api/typescript-to-flow", value, "plain/text"),
|
|
[]
|
|
);
|
|
|
|
return (
|
|
<ConversionPanel
|
|
transformer={transformer}
|
|
editorTitle="TypeScript"
|
|
editorLanguage="typescript"
|
|
resultTitle="Flow"
|
|
resultLanguage={"plaintext"}
|
|
resultEditorProps={{
|
|
topNotifications: () => (
|
|
<Alert
|
|
backgroundColor="#e7f7ff"
|
|
title="This code is converted on the server."
|
|
/>
|
|
)
|
|
}}
|
|
/>
|
|
);
|
|
}
|