1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 10:22:30 +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"; readonly compact?: boolean | "icon";
palette?: "primary" | "secondary" | "success" | "warning" | "danger" | "accent" | "link"; palette?: "primary" | "secondary" | "success" | "warning" | "danger" | "accent" | "link";
size?: "small" | "medium" | "large"; size?: "small" | "medium" | "large";
grow?: boolean;
readonly disabled?: boolean; readonly disabled?: boolean;
} }
@ -44,6 +45,7 @@ export default styled.button<Props>`
} }
}}; }};
width: ${(props) => { width: ${(props) => {
if (props.grow) return "auto";
switch (props.size) { switch (props.size) {
default: default:
case "small": case "small":
@ -55,6 +57,7 @@ export default styled.button<Props>`
} }
}}; }};
min-width: ${(props) => { min-width: ${(props) => {
if (props.grow) return "auto";
switch (props.size) { switch (props.size) {
default: default:
case "small": case "small":

View File

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