mirror of
https://github.com/moghtech/komodo.git
synced 2026-07-24 19:36:24 -05:00
fix add server menu (make tabs move with left css prop
This commit is contained in:
@@ -4,7 +4,6 @@ import { createStore } from "solid-js/store";
|
||||
import { pushNotification } from "../..";
|
||||
import { ADD_SERVER } from "@monitor/util";
|
||||
import { useAppState } from "../../state/StateProvider";
|
||||
import { combineClasses } from "../../util/helpers";
|
||||
import { useToggle } from "../../util/hooks";
|
||||
import Input from "../util/Input";
|
||||
import Grid from "../util/layout/Grid";
|
||||
@@ -50,29 +49,24 @@ const Content: Component<{ close: () => void }> = (p) => {
|
||||
}
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Grid
|
||||
placeItems="center"
|
||||
style={{ padding: "2rem 1rem 1rem 1rem" }}
|
||||
>
|
||||
<Input
|
||||
ref={nameInput}
|
||||
value={server.name}
|
||||
onEdit={(name) => setServer("name", name)}
|
||||
placeholder="name"
|
||||
style={{ "font-size": "1.5rem" }}
|
||||
/>
|
||||
<Input
|
||||
value={server.address}
|
||||
onEdit={(address) => setServer("address", address)}
|
||||
placeholder="address"
|
||||
style={{ "font-size": "1.5rem" }}
|
||||
/>
|
||||
<button class="green" style={{ width: "100%" }} onClick={create}>
|
||||
add
|
||||
</button>
|
||||
</Grid>
|
||||
</>
|
||||
<Grid placeItems="center" style={{ padding: "2rem 1rem 1rem 1rem" }}>
|
||||
<Input
|
||||
ref={nameInput}
|
||||
value={server.name}
|
||||
onEdit={(name) => setServer("name", name)}
|
||||
placeholder="name"
|
||||
style={{ "font-size": "1.5rem" }}
|
||||
/>
|
||||
<Input
|
||||
value={server.address}
|
||||
onEdit={(address) => setServer("address", address)}
|
||||
placeholder="address"
|
||||
style={{ "font-size": "1.5rem" }}
|
||||
/>
|
||||
<button class="green" style={{ width: "100%" }} onClick={create}>
|
||||
add
|
||||
</button>
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import { combineClasses } from "../../../util/helpers";
|
||||
import { LocalStorageSetter, useLocalStorage } from "../../../util/hooks";
|
||||
import Button from "../Button";
|
||||
import Flex from "../layout/Flex";
|
||||
import Grid from "../layout/Grid";
|
||||
import s from "./tabs.module.scss";
|
||||
|
||||
export type Tab = {
|
||||
@@ -86,9 +85,10 @@ export const ControlledTabs: Component<{
|
||||
<Flex
|
||||
gap="0rem"
|
||||
style={{
|
||||
position: "relative",
|
||||
width: `${tabs().length * 100}%`,
|
||||
transform: `translateX(-${(current() / tabs().length) * 100}%)`,
|
||||
transition: "transform 350ms ease",
|
||||
left: `-${current() * 100}%`,
|
||||
transition: "left 350ms ease",
|
||||
}}
|
||||
>
|
||||
<For each={tabs()}>
|
||||
|
||||
Reference in New Issue
Block a user