mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 20:09:11 +00:00
* try editor as preview * add databinding for editor actions and message * add actions, reordering base interactions * add drag and drop ordering for categoriers * category skeleton * fix linting issues * add role list and add button, non-functional * bump packages * add role search prototype * yarn.lock sync * fix lint * remove cfw-emulator bin
26 lines
643 B
TypeScript
26 lines
643 B
TypeScript
import * as React from 'react';
|
|
import { mastheadSlugs } from '../../fixtures/storyData';
|
|
import { EditableServerMessage } from './EditableServerMessage';
|
|
export default {
|
|
title: 'Molecules/Editable Server Message',
|
|
component: EditableServerMessage,
|
|
args: {
|
|
value: 'Hello World',
|
|
guild: mastheadSlugs[1],
|
|
},
|
|
};
|
|
|
|
export const editableServerMessage = (args) => {
|
|
const [value, setValue] = React.useState(args.value);
|
|
React.useEffect(() => {
|
|
setValue(args.value);
|
|
}, [args.value]);
|
|
|
|
return (
|
|
<EditableServerMessage
|
|
{...args}
|
|
value={value}
|
|
onChange={(message) => setValue(message)}
|
|
/>
|
|
);
|
|
};
|