fix: user picker checkbox + width

fixes #657
fixes #681
This commit is contained in:
Paul Makles 2022-06-14 17:10:59 +01:00
parent 5835064219
commit b44779c89a
3 changed files with 13 additions and 21 deletions

2
external/lang vendored

@ -1 +1 @@
Subproject commit db62af5cee441c5d78bf4fc18c40f4aeffafc97d Subproject commit c8284d49b09b108e42fac4a7bdeaf3a447757b61

View file

@ -1,6 +1,6 @@
import { User } from "revolt.js"; import { User } from "revolt.js";
import { Checkbox } from "@revoltchat/ui"; import { Checkbox, Row, Column } from "@revoltchat/ui";
import UserIcon from "./UserIcon"; import UserIcon from "./UserIcon";
import { Username } from "./UserShort"; import { Username } from "./UserShort";
@ -9,9 +9,16 @@ type UserProps = { value: boolean; onChange: (v: boolean) => void; user: User };
export default function UserCheckbox({ user, ...props }: UserProps) { export default function UserCheckbox({ user, ...props }: UserProps) {
return ( return (
<Checkbox {...props}> <Checkbox
{...props}
title={
<Row centred>
<UserIcon target={user} size={32} /> <UserIcon target={user} size={32} />
<Column centred>
<Username user={user} /> <Username user={user} />
</Checkbox> </Column>
</Row>
}
/>
); );
} }

View file

@ -1,20 +1,5 @@
.list { .list {
width: 400px;
max-width: 100%; max-width: 100%;
max-height: 360px; max-height: 360px;
overflow-y: scroll; overflow-y: scroll;
> label {
> span {
align-items: flex-start !important;
> span {
display: flex;
padding: 4px;
flex-direction: row;
gap: 10px;
justify-content: flex-start;
align-items: center;
}
}
}
} }