Virtualised sidebar test.

This commit is contained in:
Paul
2021-08-08 16:17:16 +01:00
parent 17f68088d1
commit 8e24d1490c
11 changed files with 241 additions and 36 deletions

View File

@@ -30,6 +30,7 @@ type CommonProps = Omit<
active?: boolean;
alert?: "unread" | "mention";
alertCount?: number;
margin?: boolean;
};
type UserProps = CommonProps & {
@@ -39,8 +40,16 @@ type UserProps = CommonProps & {
};
export const UserButton = observer((props: UserProps) => {
const { active, alert, alertCount, user, context, channel, ...divProps } =
props;
const {
active,
alert,
margin,
alertCount,
user,
context,
channel,
...divProps
} = props;
const { openScreen } = useIntermediate();
return (
@@ -48,6 +57,7 @@ export const UserButton = observer((props: UserProps) => {
{...divProps}
className={classNames(styles.item, styles.user)}
data-active={active}
data-margin={margin}
data-alert={typeof alert === "string"}
data-online={
typeof channel !== "undefined" ||