From 76c11aa697e3ada81c876fe8a3ac6e33b4ce8cb9 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 20 Apr 2023 12:39:30 +0200 Subject: [PATCH] fix: lint:fix Signed-off-by: Gabriel --- ...otify-error-port-forwarding.injectable.tsx | 2 +- packages/ui-components/button/index.ts | 2 +- packages/ui-components/button/src/button.tsx | 29 ++++++++++++++++--- .../ui-components/button/tailwind.config.js | 6 ++-- packages/ui-components/tooltip/index.ts | 2 +- .../ui-components/tooltip/tailwind.config.js | 6 ++-- 6 files changed, 32 insertions(+), 15 deletions(-) diff --git a/packages/core/src/renderer/port-forward/notify-error-port-forwarding.injectable.tsx b/packages/core/src/renderer/port-forward/notify-error-port-forwarding.injectable.tsx index 6763f3b268..edd8357be7 100644 --- a/packages/core/src/renderer/port-forward/notify-error-port-forwarding.injectable.tsx +++ b/packages/core/src/renderer/port-forward/notify-error-port-forwarding.injectable.tsx @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import navigateToPortForwardsInjectable from "../../common/front-end-routing/routes/cluster/network/port-forwards/navigate-to-port-forwards.injectable"; import showErrorNotificationInjectable from "../components/notifications/show-error-notification.injectable"; import React from "react"; -import { Button } from from "@k8slens/button"; +import { Button } from "@k8slens/button"; const notifyErrorPortForwardingInjectable = getInjectable({ id: "notify-error-port-forwarding", diff --git a/packages/ui-components/button/index.ts b/packages/ui-components/button/index.ts index 74e169183b..466f36548c 100644 --- a/packages/ui-components/button/index.ts +++ b/packages/ui-components/button/index.ts @@ -3,4 +3,4 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -export * from "./src/button"; \ No newline at end of file +export * from "./src/button"; diff --git a/packages/ui-components/button/src/button.tsx b/packages/ui-components/button/src/button.tsx index 987e299a9c..d7e704a7db 100644 --- a/packages/ui-components/button/src/button.tsx +++ b/packages/ui-components/button/src/button.tsx @@ -27,14 +27,35 @@ export interface ButtonProps extends ButtonHTMLAttributes { export const Button = withTooltip((props: ButtonProps) => { const { - waiting, label, primary, accent, plain, hidden, active, big, - round, outlined, light, children, ...btnProps + waiting, + label, + primary, + accent, + plain, + hidden, + active, + big, + round, + outlined, + light, + children, + ...btnProps } = props; - if (hidden) return null; + if (hidden) { + return null; + } btnProps.className = cssNames("Button", btnProps.className, { - waiting, primary, accent, plain, active, big, round, outlined, light, + waiting, + primary, + accent, + plain, + active, + big, + round, + outlined, + light, }); // render as link diff --git a/packages/ui-components/button/tailwind.config.js b/packages/ui-components/button/tailwind.config.js index 59cf6201b3..0feb6790ac 100644 --- a/packages/ui-components/button/tailwind.config.js +++ b/packages/ui-components/button/tailwind.config.js @@ -3,12 +3,10 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -const path = require('path'); +const path = require("path"); module.exports = { - content: [ - path.join(__dirname, "src/**/*.tsx") - ], + content: [path.join(__dirname, "src/**/*.tsx")], darkMode: "class", theme: { fontFamily: { diff --git a/packages/ui-components/tooltip/index.ts b/packages/ui-components/tooltip/index.ts index cad2ff6ec9..9d68991ec4 100644 --- a/packages/ui-components/tooltip/index.ts +++ b/packages/ui-components/tooltip/index.ts @@ -1,2 +1,2 @@ export * from "./src/tooltip"; -export * from "./src/withTooltip"; \ No newline at end of file +export * from "./src/withTooltip"; diff --git a/packages/ui-components/tooltip/tailwind.config.js b/packages/ui-components/tooltip/tailwind.config.js index 59cf6201b3..0feb6790ac 100644 --- a/packages/ui-components/tooltip/tailwind.config.js +++ b/packages/ui-components/tooltip/tailwind.config.js @@ -3,12 +3,10 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -const path = require('path'); +const path = require("path"); module.exports = { - content: [ - path.join(__dirname, "src/**/*.tsx") - ], + content: [path.join(__dirname, "src/**/*.tsx")], darkMode: "class", theme: { fontFamily: {