Add style and story for generic chat action message
This commit is contained in:
@@ -1,11 +0,0 @@
|
|||||||
/* eslint-disable react/no-danger */
|
|
||||||
interface Props {
|
|
||||||
body: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
export default function ChatActionMessage(props: Props) {
|
|
||||||
const { body } = props;
|
|
||||||
|
|
||||||
return <div dangerouslySetInnerHTML={{ __html: body }} />;
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||||
import ChatActionMessage from '../components/chat/ChatActionMessage';
|
import ChatActionMessage from '../components/chat/ChatAction/ChatActionMessage';
|
||||||
import Mock from './assets/mocks/chatmessage-action.png';
|
import Mock from './assets/mocks/chatmessage-action.png';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -19,8 +19,9 @@ export default {
|
|||||||
},
|
},
|
||||||
} as ComponentMeta<typeof ChatActionMessage>;
|
} as ComponentMeta<typeof ChatActionMessage>;
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
const Template: ComponentStory<typeof ChatActionMessage> = args => <ChatActionMessage {...args} />;
|
const Template: ComponentStory<typeof ChatActionMessage> = args => <ChatActionMessage {...args} />;
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
export const Basic = Template.bind({});
|
export const Basic = Template.bind({});
|
||||||
|
Basic.args = {
|
||||||
|
body: 'This is a basic action message.',
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user