diff --git a/web/modals/threads/thread-settings-general-tab.css b/web/modals/threads/thread-settings-general-tab.css new file mode 100644 --- /dev/null +++ b/web/modals/threads/thread-settings-general-tab.css @@ -0,0 +1,38 @@ +div.form_title { + padding: 6px 6px 0 0; + font-size: 14px; + font-weight: 600; + vertical-align: top; + color: var(--fg); +} +div.form_content { + display: flex; + font-family: var(--font-stack); + color: var(--fg); + margin-top: 4px; + margin-bottom: 8px; +} +div.form_content input { + margin-bottom: 4px; +} +div.form_content textarea { + padding: 12px; + background: var(--modal-bg); + color: var(--fg); + border: 1px solid var(--border-color); + font-size: var(--m-font-16); + border-radius: 4px; + width: 100%; +} + +div.form_textarea_container { + margin-top: 1px; +} + +div.edit_thread_color_container { + margin-top: -5px; +} + +div.color_title { + margin-top: 4px; +} diff --git a/web/modals/threads/thread-settings-general-tab.react.js b/web/modals/threads/thread-settings-general-tab.react.js new file mode 100644 --- /dev/null +++ b/web/modals/threads/thread-settings-general-tab.react.js @@ -0,0 +1,76 @@ +// @flow + +import * as React from 'react'; + +import Input from '../input.react.js'; +import ColorSelector from './color-selector.react.js'; +import css from './thread-settings-general-tab.css'; + +type ThreadSettingsGeneralTabProps = { + +threadNameValue: string, + +threadNamePlaceholder: string, + +threadNameOnChange: (event: SyntheticEvent) => void, + +threadNameDisabled: boolean, + +threadNameInputRef: (nameInput: ?HTMLInputElement) => void, + +threadDescriptionValue: string, + +threadDescriptionOnChange: ( + event: SyntheticEvent, + ) => void, + +threadDescriptionDisabled: boolean, + +threadColorCurrentColor: string, + +threadColorOnColorSelection: (color: string) => void, +}; +function ThreadSettingsGeneralTab( + props: ThreadSettingsGeneralTabProps, +): React.Node { + const { + threadNameValue, + threadNamePlaceholder, + threadNameOnChange, + threadNameDisabled, + threadNameInputRef, + threadDescriptionValue, + threadDescriptionOnChange, + threadDescriptionDisabled, + threadColorCurrentColor, + threadColorOnColorSelection, + } = props; + + return ( +
+
+
Thread name
+
+ +
+
+
+
Description
+
+