Skip to content

Commit

Permalink
fix(select): fix export type (#76)
Browse files Browse the repository at this point in the history
Co-authored-by: Chao Zhou <zctocm@gmail.com>
Co-authored-by: guichi <zgc910619@gmail.com>
Co-authored-by: yqrashawn <namy.19@gmail.com>
  • Loading branch information
4 people committed Aug 26, 2020
1 parent 00d5edb commit fda7afb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const defaultProps = {
}

type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>
export type SelectProps = Props & NativeAttrs
export type SelectProps = React.PropsWithChildren<Props & NativeAttrs>
type SelectPropsWithDefault = SelectProps & typeof defaultProps

const Select = forwardRef<SelectHandles, React.PropsWithChildren<SelectProps>>(
(
Expand All @@ -75,7 +76,7 @@ const Select = forwardRef<SelectHandles, React.PropsWithChildren<SelectProps>>(
dropdownStyle,
disableMatchWidth,
...props
}: React.PropsWithChildren<SelectProps & typeof defaultProps>,
}: SelectPropsWithDefault,
ref: RefObject<SelectHandles>,
) => {
const theme = useTheme()
Expand Down

0 comments on commit fda7afb

Please sign in to comment.