Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/components/store/title-description.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Divider, Form, Input } from "antd";67export function TitleDescription({ form, showExplanations, disabled = false }) {8return (9<>10<Divider plain>Customizable Descriptors</Divider>11<Form.Item12label="Title"13name="title"14style={{ width: "100%" }}15extra={16showExplanations ? (17<p>18Given your license a title makes it easier to keep track of. You19can change it at any time.20</p>21) : undefined22}23>24<Input25disabled={disabled}26placeholder="Enter the title of your license (optional)"27value={form.getFieldValue("title")}28onChange={(e) => {29form.setFieldValue({ title: e.target.value });30}}31/>32</Form.Item>33<Form.Item34label="Description"35name="description"36extra={37showExplanations ? (38<p>39Given your license a longer description to record extra40information that isn't always shown with the license. You can41change this at any time.42</p>43) : undefined44}45>46<Input.TextArea47disabled={disabled}48placeholder="Describe your license (optional)"49rows={2}50value={form.getFieldValue("description")}51onChange={(e) => {52form.setFieldValue({ description: e.target.value });53}}54/>55</Form.Item>56</>57);58}596061