mirror of
https://github.com/Sevichecc/raycast-akkoma-extension.git
synced 2025-04-30 14:49:29 +08:00
27 lines
657 B
TypeScript
27 lines
657 B
TypeScript
import { useState } from "react";
|
|
import { Form } from "@raycast/api";
|
|
|
|
interface statusProps {
|
|
isMarkdown: boolean;
|
|
draftStatus: string | undefined;
|
|
}
|
|
|
|
const StatusContent = ({ isMarkdown, draftStatus }: statusProps) => {
|
|
const [statusContent, setStatusContent] = useState<string>(draftStatus || "");
|
|
|
|
return (
|
|
<>
|
|
<Form.TextArea
|
|
id="status"
|
|
title="Content"
|
|
placeholder={`Write something down ${isMarkdown ? "with Markdown" : ""}`}
|
|
enableMarkdown={isMarkdown}
|
|
autoFocus={true}
|
|
value={statusContent}
|
|
onChange={setStatusContent}
|
|
/>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default StatusContent;
|