From c2e5896e9970f63f3184980d1573338529a4c68c Mon Sep 17 00:00:00 2001 From: viktoriaas Date: Fri, 20 Dec 2024 15:38:59 +0100 Subject: [PATCH] fixed icon --- src/HomePage.jsx | 58 +++++++++---------- .../DropDownButton/DropDownButton.css | 13 +++-- src/components/InfoBox/InfoBox.css | 1 + src/components/InfoBox/InfoBox.tsx | 2 +- 4 files changed, 38 insertions(+), 36 deletions(-) diff --git a/src/HomePage.jsx b/src/HomePage.jsx index e4ceb21..00b7956 100644 --- a/src/HomePage.jsx +++ b/src/HomePage.jsx @@ -10,35 +10,35 @@ import { FieldHeader } from "./components/FieldHeader/FieldHeader"; function HomePage() { // for testing with npm run dev please uncomment this block - const appConfig = { - spawners: { - "test": { - last_activity: "2024-11-24T15:48:29.604740Z", - url: "/user/test", - active: true, - ready: false, - }, - "test1": { - last_activity: "2024-11-24T15:46:56.719146Z", - url: "/user/test1", - active: false, - ready: false, - }, - ...Array.from({ length: 50 }, (_, i) => `spawner${i + 1}`).reduce((acc, spawner) => { - acc[spawner] = { - last_activity: new Date().toISOString(), - url: `/user/${spawner}`, - active: Math.random() < 0.5, // Randomly set active status - ready: Math.random() < 0.5, // Randomly set ready status - }; - return acc; - }, {}) - }, - default_server_active: false, - url: "http://localhost", - userName: "dev", - xsrf: "sample-xsrf-token", - }; + // const appConfig = { + // spawners: { + // "test": { + // last_activity: "2024-11-24T15:48:29.604740Z", + // url: "/user/test", + // active: true, + // ready: false, + // }, + // "test1": { + // last_activity: "2024-11-24T15:46:56.719146Z", + // url: "/user/test1", + // active: false, + // ready: false, + // }, + // ...Array.from({ length: 50 }, (_, i) => `spawner${i + 1}`).reduce((acc, spawner) => { + // acc[spawner] = { + // last_activity: new Date().toISOString(), + // url: `/user/${spawner}`, + // active: Math.random() < 0.5, // Randomly set active status + // ready: Math.random() < 0.5, // Randomly set ready status + // }; + // return acc; + // }, {}) + // }, + // default_server_active: false, + // url: "http://localhost", + // userName: "dev", + // xsrf: "sample-xsrf-token", + // }; const [spawners, setSpawners] = useState(appConfig.spawners); const [defaultServerActive, setDefaultServerActive] = useState( diff --git a/src/components/DropDownButton/DropDownButton.css b/src/components/DropDownButton/DropDownButton.css index 9d612b2..240c1b7 100644 --- a/src/components/DropDownButton/DropDownButton.css +++ b/src/components/DropDownButton/DropDownButton.css @@ -23,6 +23,7 @@ .icon { grid-area: icon; + /*margin: 0;*/ font-size: 16px; } @@ -125,12 +126,12 @@ border: none; } -.info-icon { - margin-left: 10px; - cursor: pointer; - position: relative; - display: inline-block; -} +/*.info-icon {*/ +/* margin-left: 10px;*/ +/* cursor: pointer;*/ +/* position: relative;*/ +/* display: inline-block;*/ +/*}*/ .dropbtn--secondary { display: flex; diff --git a/src/components/InfoBox/InfoBox.css b/src/components/InfoBox/InfoBox.css index 6635a24..a533827 100644 --- a/src/components/InfoBox/InfoBox.css +++ b/src/components/InfoBox/InfoBox.css @@ -1,6 +1,7 @@ .info-icon { position: relative; display: inline-block; + margin-left: auto; } .info-text { diff --git a/src/components/InfoBox/InfoBox.tsx b/src/components/InfoBox/InfoBox.tsx index 6b93c83..8de474d 100644 --- a/src/components/InfoBox/InfoBox.tsx +++ b/src/components/InfoBox/InfoBox.tsx @@ -19,7 +19,7 @@ export const InfoBox: React.FC = ({ infoText }) => { }; return ( -