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:
parent
4bd83dd5b0
commit
85ee16e7b9
@ -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":
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user