Advertisement
Guest User

quotation.tsx

a guest
Jun 18th, 2021
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import ForgeUI, {
  2.     render,
  3.     ProjectPage,
  4.     Text,
  5.     Table,
  6.     Head,
  7.     Row,
  8.     Cell, useState
  9. } from "@forge/ui";
  10. import {ForgeElement} from "@forge/ui/out/types";
  11.  
  12. export declare type ConfigElement = (props: object) => ForgeElement;
  13.  
  14. interface Quotation {
  15.     name: string,
  16.     text: string
  17. }
  18.  
  19. const QuotationPage: ConfigElement = () => {
  20.     const [quotations, setQuotations] = useState<Quotation[]>([]);
  21.     return (
  22.         <Table>
  23.             <Head>
  24.                 <Cell>
  25.                     <Text>Issue Key</Text>
  26.                 </Cell>
  27.                 <Cell>
  28.                     <Text>Status</Text>
  29.                 </Cell>
  30.             </Head>
  31.             {quotations.map(quotation =>
  32.                 <Row>
  33.                     <Cell>
  34.                         <Text>{quotation.name}</Text>
  35.                     </Cell>
  36.                     <Cell>
  37.                         <Text>{quotation.text}</Text>
  38.                     </Cell>
  39.                 </Row>
  40.             )}
  41.         </Table>
  42.     );
  43. };
  44.  
  45. // noinspection JSUnusedGlobalSymbols
  46. export const run = render(
  47.     <ProjectPage>
  48.         <QuotationPage/>
  49.     </ProjectPage>
  50. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement