mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 22:40:29 +03:00
add bubble layout for event content
This commit is contained in:
parent
3a14ad764e
commit
fc2cdba317
1 changed files with 8 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import { Box, Icon, IconSrc } from 'folds';
|
import { Box, Icon, IconSrc } from 'folds';
|
||||||
import React, { ReactNode } from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
import { CompactLayout, ModernLayout } from '..';
|
import { BubbleLayout, CompactLayout, ModernLayout } from '..';
|
||||||
import { MessageLayout } from '../../../state/settings';
|
import { MessageLayout } from '../../../state/settings';
|
||||||
|
|
||||||
export type EventContentProps = {
|
export type EventContentProps = {
|
||||||
|
|
@ -30,9 +30,11 @@ export function EventContent({ messageLayout, time, iconSrc, content }: EventCon
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|
||||||
return messageLayout === MessageLayout.Compact ? (
|
if (messageLayout === MessageLayout.Compact) {
|
||||||
<CompactLayout before={beforeJSX}>{msgContentJSX}</CompactLayout>
|
return <CompactLayout before={beforeJSX}>{msgContentJSX}</CompactLayout>;
|
||||||
) : (
|
}
|
||||||
<ModernLayout before={beforeJSX}>{msgContentJSX}</ModernLayout>
|
if (messageLayout === MessageLayout.Bubble) {
|
||||||
);
|
return <BubbleLayout before={beforeJSX}>{msgContentJSX}</BubbleLayout>;
|
||||||
|
}
|
||||||
|
<ModernLayout before={beforeJSX}>{msgContentJSX}</ModernLayout>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue