feat: add server message in editor

This commit is contained in:
41666 2021-07-04 13:16:26 -05:00
parent be16da1686
commit 1829035694
4 changed files with 54 additions and 8 deletions

View file

@ -0,0 +1,16 @@
import { MultilineTextInput } from '@roleypoly/design-system/atoms/text-input';
import { EditorShellProps } from '@roleypoly/design-system/organisms/editor-shell';
import * as React from 'react';
export const EditorDetailsTab = (props: EditorShellProps) => {
const [serverMessage, updateServerMessage] = React.useState(props.guild.data.message);
return (
<div>
Server Message
<MultilineTextInput
value={serverMessage}
onChange={(eventData) => updateServerMessage(eventData.target.value)}
/>
</div>
);
};

View file

@ -0,0 +1 @@
export * from './EditorDetailsTab';

View file

@ -1,5 +1,6 @@
import { Tab, TabView } from '@roleypoly/design-system/atoms/tab-view';
import { EditorCategoriesTab } from '@roleypoly/design-system/organisms/editor-categories-tab';
import { EditorDetailsTab } from '@roleypoly/design-system/organisms/editor-details-tab';
import { PresentableGuild } from '@roleypoly/types';
export type EditorShellProps = {
@ -8,7 +9,7 @@ export type EditorShellProps = {
export const EditorShell = (props: EditorShellProps) => (
<TabView initialTab={0}>
<Tab title="Guild Details">{() => <div>hi2!</div>}</Tab>
<Tab title="Guild Details">{() => <EditorDetailsTab {...props} />}</Tab>
<Tab title="Categories & Roles">{() => <EditorCategoriesTab {...props} />}</Tab>
<Tab title="Utilities">{() => <div>hi2!</div>}</Tab>
</TabView>