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