From 925a2c30ce212120f67fbd2d029770bd223dc0ff Mon Sep 17 00:00:00 2001 From: Rozhkow Date: Fri, 1 Dec 2023 17:33:30 +0400 Subject: [PATCH] fix(styles): general style fixes --- .../BaseAutoComplete/BaseAutoComplete.styles.ts | 10 ---------- .../common/BaseAutoComplete/BaseAutoComplete.tsx | 7 +------ src/components/common/BaseCheckbox/BaseCheckbox.tsx | 12 ++++++++---- 3 files changed, 9 insertions(+), 20 deletions(-) delete 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 deleted file mode 100644 index accaeadf..00000000 --- a/src/components/common/BaseAutoComplete/BaseAutoComplete.styles.ts +++ /dev/null @@ -1,10 +0,0 @@ -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 369e481a..7037570e 100644 --- a/src/components/common/BaseAutoComplete/BaseAutoComplete.tsx +++ b/src/components/common/BaseAutoComplete/BaseAutoComplete.tsx @@ -1,7 +1,2 @@ -import * as S from './BaseAutoComplete.styles'; - +export { AutoComplete as BaseAutoComplete } from 'antd'; 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/BaseCheckbox/BaseCheckbox.tsx b/src/components/common/BaseCheckbox/BaseCheckbox.tsx index cd30b5f2..8abbc528 100644 --- a/src/components/common/BaseCheckbox/BaseCheckbox.tsx +++ b/src/components/common/BaseCheckbox/BaseCheckbox.tsx @@ -4,12 +4,16 @@ import * as S from './BaseCheckbox.styles'; export type BaseCheckboxProps = CheckboxProps; -interface BaseCheckboxInterface extends React.FC { +const Checkbox = React.forwardRef((props, ref) => { + return ; +}); + +type CheckboxForwardRef = typeof Checkbox; + +interface BaseCheckboxInterface extends CheckboxForwardRef { Group: typeof S.CheckboxGroup; } -export const BaseCheckbox: BaseCheckboxInterface = (props) => { - return ; -}; +export const BaseCheckbox = Checkbox as BaseCheckboxInterface; BaseCheckbox.Group = S.CheckboxGroup; \ No newline at end of file