From 70399f9904a93426078762dacd63b263eac7f49d Mon Sep 17 00:00:00 2001 From: Haider Alshamma Date: Thu, 21 Nov 2024 16:40:00 -0500 Subject: [PATCH] fix: lint issues --- src/BottomSheet/BottomSheet.parts.story.tsx | 1 - src/DatePicker/DatePickerStyles.ts | 7 +-- src/Divider/index.ts | 2 - src/NDSProvider/GlobalStyles.tsx | 54 ++++++++++----------- src/utils/story/dashed.tsx | 2 +- 5 files changed, 31 insertions(+), 35 deletions(-) delete mode 100644 src/BottomSheet/BottomSheet.parts.story.tsx diff --git a/src/BottomSheet/BottomSheet.parts.story.tsx b/src/BottomSheet/BottomSheet.parts.story.tsx deleted file mode 100644 index 8b1378917..000000000 --- a/src/BottomSheet/BottomSheet.parts.story.tsx +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/DatePicker/DatePickerStyles.ts b/src/DatePicker/DatePickerStyles.ts index aa4474a3f..ef2cbd1fc 100644 --- a/src/DatePicker/DatePickerStyles.ts +++ b/src/DatePicker/DatePickerStyles.ts @@ -83,9 +83,10 @@ export const DatePickerStyles = createGlobalStyle<{ theme: DefaultNDSThemeType } cursor: "pointer", }, }, - ".react-datepicker__day--disabled:hover,.react-datepicker__month-text--disabled:hover,.react-datepicker__quarter-text--disabled:hover": { - backgroundColor: "transparent", - }, + ".react-datepicker__day--disabled:hover,.react-datepicker__month-text--disabled:hover,.react-datepicker__quarter-text--disabled:hover": + { + backgroundColor: "transparent", + }, ".react-datepicker__day-names, .react-datepicker__week": { whiteSpace: "nowrap", }, diff --git a/src/Divider/index.ts b/src/Divider/index.ts index 8471052a4..5aafb2563 100644 --- a/src/Divider/index.ts +++ b/src/Divider/index.ts @@ -1,3 +1 @@ - export { default as Divider } from "./Divider"; - diff --git a/src/NDSProvider/GlobalStyles.tsx b/src/NDSProvider/GlobalStyles.tsx index 8430e4961..a9d42daf9 100644 --- a/src/NDSProvider/GlobalStyles.tsx +++ b/src/NDSProvider/GlobalStyles.tsx @@ -6,34 +6,32 @@ export type GlobalStylesProps = { locale?: string; }; -const GlobalStyles = styled.div( - ({ theme, locale }: GlobalStylesProps): CSSObject => { - const fontFamily = locale === "zh_CN" ? theme.fonts.sc : theme.fonts.base; - return { - color: theme.colors.black, +const GlobalStyles = styled.div(({ theme, locale }: GlobalStylesProps): CSSObject => { + const fontFamily = locale === "zh_CN" ? theme.fonts.sc : theme.fonts.base; + return { + color: theme.colors.black, + fontFamily, + fontSize: theme.fontSizes.base, + lineHeight: theme.lineHeights.base, + "-webkit-font-smoothing": "antialiased", + "-moz-osx-font-smoothing": "grayscale", + "*": { + boxSizing: "border-box", + }, + img: { + maxWidth: "100%", + height: "auto", + }, + button: { fontFamily, - fontSize: theme.fontSizes.base, - lineHeight: theme.lineHeights.base, - "-webkit-font-smoothing": "antialiased", - "-moz-osx-font-smoothing": "grayscale", - "*": { - boxSizing: "border-box", - }, - img: { - maxWidth: "100%", - height: "auto", - }, - button: { - fontFamily, - }, - input: { - fontFamily, - }, - textarea: { - fontFamily, - }, - }; - } -); + }, + input: { + fontFamily, + }, + textarea: { + fontFamily, + }, + }; +}); export default GlobalStyles; diff --git a/src/utils/story/dashed.tsx b/src/utils/story/dashed.tsx index f81438854..5d87a1a74 100644 --- a/src/utils/story/dashed.tsx +++ b/src/utils/story/dashed.tsx @@ -1,6 +1,6 @@ import styled, { StyledComponent } from "styled-components"; import { ComponentType } from "react"; -import { DefaultNDSThemeType } from "../../theme.type"; +import { DefaultNDSThemeType } from "../../theme"; /** * A styled utility that adds a dashed border around a component