Skip to content

Commit

Permalink
type fix for setting call
Browse files Browse the repository at this point in the history
  • Loading branch information
heyjul3s committed Jan 26, 2021
1 parent 6fcb9e7 commit 9c3d1da
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/component-generator/src/createComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { isValidElementType } from 'react-is';
import isPlainObject from 'lodash.isplainobject';
import isEmpty from 'lodash.isempty';
import { createStyledComponent, createFC } from './createStyledComponent';

import { Settings, BaseConfig, Variant, ComponentsRecord } from './typings';

/* eslint-disable @typescript-eslint/no-explicit-any */
Expand All @@ -29,7 +28,7 @@ export function createComponents<
dict[prop] = isConfigBase
? generateComponent<ThemeType, Props, Element>(
base as BaseConfig<Props, AllHTMLAttributes<Element>, ThemeType>,
setting
setting as Settings<Element>
)
: createFC<Props>(base as React.FC<Props>, setting);
dict[prop].displayName = prop;
Expand Down Expand Up @@ -70,7 +69,7 @@ export function generateComponent<
Element = HTMLDivElement
>(
base: BaseConfig<Props, AllHTMLAttributes<Element>, ThemeType>,
setting: ScalableCSS | undefined
setting: Settings<Element>
) {
return createStyledComponent<Props, ThemeType, AllHTMLAttributes<Element>>({
...base,
Expand Down

0 comments on commit 9c3d1da

Please sign in to comment.