From 3f5e5a99a66dceeb4bf6a93f60e93ef38f608614 Mon Sep 17 00:00:00 2001 From: Rozhkow Date: Fri, 1 Dec 2023 17:14:06 +0400 Subject: [PATCH] fix(styles): remove styles from ui components file --- .../BaseAutoComplete.styles.ts | 10 ++++++++++ .../BaseAutoComplete/BaseAutoComplete.tsx | 7 ++++++- .../common/BaseRadio/BaseRadio.styles.ts | 4 ---- .../common/BaseSpin/BaseSpin.styles.ts | 6 +++++- .../UIComponentsPage.styles.ts | 18 ------------------ 5 files changed, 21 insertions(+), 24 deletions(-) create mode 100644 src/components/common/BaseAutoComplete/BaseAutoComplete.styles.ts diff --git a/src/components/common/BaseAutoComplete/BaseAutoComplete.styles.ts b/src/components/common/BaseAutoComplete/BaseAutoComplete.styles.ts new file mode 100644 index 00000000..accaeadf --- /dev/null +++ b/src/components/common/BaseAutoComplete/BaseAutoComplete.styles.ts @@ -0,0 +1,10 @@ +import styled from 'styled-components'; +import { AutoComplete as BaseAutoComplete } from 'antd'; + +export const AutoComplete = styled(BaseAutoComplete)` + .ant-select-selection-search { + input { + font-size: ${({ theme }) => theme.fontSizes.md}; + } + } +`; diff --git a/src/components/common/BaseAutoComplete/BaseAutoComplete.tsx b/src/components/common/BaseAutoComplete/BaseAutoComplete.tsx index 7037570e..369e481a 100644 --- a/src/components/common/BaseAutoComplete/BaseAutoComplete.tsx +++ b/src/components/common/BaseAutoComplete/BaseAutoComplete.tsx @@ -1,2 +1,7 @@ -export { AutoComplete as BaseAutoComplete } from 'antd'; +import * as S from './BaseAutoComplete.styles'; + export type { AutoCompleteProps as BaseAutoCompleteProps } from 'antd'; + +export const BaseAutoComplete : React.FC = (props) => { + return ; +} \ No newline at end of file diff --git a/src/components/common/BaseRadio/BaseRadio.styles.ts b/src/components/common/BaseRadio/BaseRadio.styles.ts index 62e0c25b..0686b527 100644 --- a/src/components/common/BaseRadio/BaseRadio.styles.ts +++ b/src/components/common/BaseRadio/BaseRadio.styles.ts @@ -8,10 +8,6 @@ export const Radio = styled(AntRadio)` } &.ant-radio-wrapper { - .ant-radio { - align-self: inherit; - } - .ant-radio-inner, .ant-radio-inner::after { width: 1rem; diff --git a/src/components/common/BaseSpin/BaseSpin.styles.ts b/src/components/common/BaseSpin/BaseSpin.styles.ts index 3307f8a5..4462f25b 100644 --- a/src/components/common/BaseSpin/BaseSpin.styles.ts +++ b/src/components/common/BaseSpin/BaseSpin.styles.ts @@ -1,4 +1,8 @@ import styled from 'styled-components'; import { Spin as AntSpin } from 'antd'; -export const Spin = styled(AntSpin)``; +export const Spin = styled(AntSpin)` + .ant-spin-blur { + opacity: 0; + } +`; diff --git a/src/pages/uiComponentsPages/UIComponentsPage.styles.ts b/src/pages/uiComponentsPages/UIComponentsPage.styles.ts index 76a374fc..2851876f 100644 --- a/src/pages/uiComponentsPages/UIComponentsPage.styles.ts +++ b/src/pages/uiComponentsPages/UIComponentsPage.styles.ts @@ -25,24 +25,6 @@ export const Card = styled(CommonCard)` &.ant-card-bordered { border: 1px solid ${({ theme }) => theme.border}; } - - .ant-radio-wrapper, label { - align-items: center; - } - - .ant-spin-blur { - opacity: 0; - } - - .ant-select-selection-search { - input { - font-size: ${({ theme }) => theme.fontSizes.md}; - } - } - - .ant-select-selection-placeholder { - opacity: 0.5; - } `; export const InputsWrapper = styled.div`