1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 02:12:38 +01:00

fix buttons on add server modal

This commit is contained in:
Puyodead1 2023-12-18 11:53:07 -05:00
parent 4bd83dd5b0
commit 85ee16e7b9
No known key found for this signature in database
GPG Key ID: BA5F91AAEF68E5CE
2 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ export interface Props {
readonly compact?: boolean | "icon";
palette?: "primary" | "secondary" | "success" | "warning" | "danger" | "accent" | "link";
size?: "small" | "medium" | "large";
grow?: boolean;
readonly disabled?: boolean;
}
@ -44,6 +45,7 @@ export default styled.button<Props>`
}
}};
width: ${(props) => {
if (props.grow) return "auto";
switch (props.size) {
default:
case "small":
@ -55,6 +57,7 @@ export default styled.button<Props>`
}
}};
min-width: ${(props) => {
if (props.grow) return "auto";
switch (props.size) {
default:
case "small":

View File

@ -14,6 +14,7 @@ export function AddServerModal({ ...props }: ModalProps<"add_server">) {
<ActionWrapper>
<Button
palette="primary"
grow
onClick={() => {
modalController.push({
type: "create_server",
@ -25,6 +26,7 @@ export function AddServerModal({ ...props }: ModalProps<"add_server">) {
<Button
palette="secondary"
grow
onClick={() => {
modalController.push({
type: "join_server",