From aa6178224e1a0d1123b436c3b0134fe069a68cce Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Sat, 11 Jun 2022 13:24:10 +0100 Subject: [PATCH] fix lint. --- CommonUI/src/Components/Basic/Icon/Icon.tsx | 2 +- .../src/Components/Dashboard/Table/Table.tsx | 16 +++++++++------- .../Dashboard/TopBar/SearchBar/SearchBar.scss | 2 +- .../TopBar/TopbarMenuButton/MenuButton.tsx | 6 +----- .../src/Components/Monitor/MonitorTable.tsx | 7 ++++++- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CommonUI/src/Components/Basic/Icon/Icon.tsx b/CommonUI/src/Components/Basic/Icon/Icon.tsx index ad8c55b255..e8e382399e 100644 --- a/CommonUI/src/Components/Basic/Icon/Icon.tsx +++ b/CommonUI/src/Components/Basic/Icon/Icon.tsx @@ -20,7 +20,7 @@ export interface ComponentProps { const Icon: FunctionComponent = ({ icon, - size, + size = SizeProp.Regular, }: ComponentProps): ReactElement => { return ( diff --git a/CommonUI/src/Components/Dashboard/Table/Table.tsx b/CommonUI/src/Components/Dashboard/Table/Table.tsx index e2f75af2f9..dd633059fc 100644 --- a/CommonUI/src/Components/Dashboard/Table/Table.tsx +++ b/CommonUI/src/Components/Dashboard/Table/Table.tsx @@ -56,13 +56,15 @@ const Table: FunctionComponent = ({ records.map((record: JSONObject, index: number) => { return ( - {columns.map((item: TableColumn, index: number) => { - return ( - - {record[item.key] as string} - - ); - })} + {columns.map( + (item: TableColumn, index: number) => { + return ( + + {record[item.key] as string} + + ); + } + )} ); }) diff --git a/CommonUI/src/Components/Dashboard/TopBar/SearchBar/SearchBar.scss b/CommonUI/src/Components/Dashboard/TopBar/SearchBar/SearchBar.scss index 2648db765a..1172fddd67 100644 --- a/CommonUI/src/Components/Dashboard/TopBar/SearchBar/SearchBar.scss +++ b/CommonUI/src/Components/Dashboard/TopBar/SearchBar/SearchBar.scss @@ -9,7 +9,7 @@ $transition: all 0.2s linear; align-items: center; padding: 0 15px; outline: 1px solid darken($primaryColor, 5%); - border-radius: 100px; + border-radius: 5px; & > * { flex: 0 0 5%; diff --git a/CommonUI/src/Components/Dashboard/TopBar/TopbarMenuButton/MenuButton.tsx b/CommonUI/src/Components/Dashboard/TopBar/TopbarMenuButton/MenuButton.tsx index b1173c8994..8f1c494493 100644 --- a/CommonUI/src/Components/Dashboard/TopBar/TopbarMenuButton/MenuButton.tsx +++ b/CommonUI/src/Components/Dashboard/TopBar/TopbarMenuButton/MenuButton.tsx @@ -18,8 +18,6 @@ export interface MenuIconButtonComponentProps { export interface MenuOutlineButtonComponentProps extends MenuIconButtonComponentProps { text?: string; - className?: string; - id?: string; } export const MenuIconButton: FunctionComponent< @@ -48,12 +46,10 @@ export const MenuOutlineButton: FunctionComponent< onClick, showModal, modalContent, - className, - id, }: MenuOutlineButtonComponentProps): ReactElement => { return (
-
+
{text} {icon && }
diff --git a/Dashboard/src/Components/Monitor/MonitorTable.tsx b/Dashboard/src/Components/Monitor/MonitorTable.tsx index ca450c0d4b..9285063aa0 100644 --- a/Dashboard/src/Components/Monitor/MonitorTable.tsx +++ b/Dashboard/src/Components/Monitor/MonitorTable.tsx @@ -1,4 +1,9 @@ -import React, { FunctionComponent, MouseEventHandler, ReactElement, useState } from 'react'; +import React, { + FunctionComponent, + MouseEventHandler, + ReactElement, + useState, +} from 'react'; import Container from 'CommonUI/src/Components/Dashboard/Container/Container/Container'; import Pagination from 'CommonUI/src/Components/Dashboard/Container/Container/Pagination'; import Table from 'CommonUI/src/Components/Dashboard/Table/Table';