cetirizine

An experimental matrix client written in reactjs utilizing tailwind and storybook
git clone git://archive.git.mtrnord.blog/MTRNord/cetirizine.git
Log | Files | Refs | README | LICENSE

commit 6f41b5fb53179418dd96adfa381d90a19552a3d2
parent 919bb2e111e97b693ac566c7ad1afb0c280ccf38
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sat,  6 May 2023 16:46:54 +0200

Fix storybook stories and fix avatar online and offline indicators

Diffstat:
Msrc/components/avatar/avatar.tsx | 6+++---
Msrc/components/input/chat/input.stories.tsx | 2++
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/components/avatar/avatar.tsx b/src/components/avatar/avatar.tsx @@ -22,14 +22,14 @@ type AvatarProps = { const Avatar: FC<AvatarProps> = memo(({ avatarUrl, displayname, dm = false, online = false }: AvatarProps) => { if (avatarUrl) { return ( - <div className="flex relative min-w-[2rem] min-h-[2rem] justify-center items-center m-0 mr-3 text-xl rounded-full text-white"> + <div className="flex relative min-w-[2rem] min-h-[2rem] w-[2rem] h-[2rem] justify-center items-center m-0 mr-3 text-xl rounded-full text-white"> <img className="rounded-full w-8 h-8 object-cover" alt={displayname} src={avatarUrl} /> { dm ? ( online ? - <div className="bg-green-500 rounded-full w-3 h-3 absolute bottom-0 right-0"></div> : - <div className="bg-red-500 rounded-full w-3 h-3 absolute bottom-0 right-0"></div> + <div className="bg-green-500 rounded-full w-3 h-3 absolute right-0 bottom-0"></div> : + <div className="bg-red-500 rounded-full w-3 h-3 absolute right-0 bottom-0"></div> ) : <></> } diff --git a/src/components/input/chat/input.stories.tsx b/src/components/input/chat/input.stories.tsx @@ -1,11 +1,13 @@ import { Meta, StoryObj } from '@storybook/react'; import ChatInput from './input'; import { BADGE } from '@geometricpanda/storybook-addon-badges'; +import { withRouter } from 'storybook-addon-react-router-v6'; const meta: Meta<typeof ChatInput> = { title: 'Chat/Input', tags: ['autodocs'], component: ChatInput, + decorators: [withRouter], parameters: { badges: [BADGE.EXPERIMENTAL] },