Skip to content

Commit

Permalink
Fix generator typings and exports
Browse files Browse the repository at this point in the history
  • Loading branch information
heyjul3s committed Dec 8, 2020
1 parent 8556956 commit 1d8114f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/block/src/createBlockComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createBaseComponents } from '@artifak/component-generator';
import { BlockBaseProps } from './typings';
import { BlockBase } from './BlockBase';

/* eslint-disable @typescript-eslint/no-explicit-any */
export function createBlockComponents<S>(
styles: S
): { [key in keyof any]: React.ComponentType<BlockBaseProps> } {
Expand Down
1 change: 1 addition & 0 deletions packages/component-generator/src/createBaseComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function extractSettings<E>(
setting: Settings<HTMLAttributes<E>> | StyledSystemCSSObject
): StyledSystemCSSObject & HTMLAttributes<E>;

/* eslint-disable @typescript-eslint/no-explicit-any */
export function extractSettings<E>(
setting: any
): StyledSystemCSSObject & HTMLAttributes<E> {
Expand Down
7 changes: 6 additions & 1 deletion packages/component-generator/src/createStyledComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ export function applyStyledComponent<
styles = {},
variants,
styleProps = []
}: StyledComponentConfig<Props, Theme, Attributes>) {
}: StyledComponentConfig<Props, Theme, Attributes>): StyledComponent<
keyof JSX.IntrinsicElements | React.ComponentType<Props>,
Theme | any,
React.ComponentType<Props & BaseComponentProps>,
keyof any
> {
return component(
styles,
variant({ variants }),
Expand Down
6 changes: 1 addition & 5 deletions packages/component-generator/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ export {

export { createStyledComponent } from './createStyledComponent';

export {
BaseComponentProps,
ComponentVariant,
StyledComponentConfig
} from './typings';
export { BaseComponentProps, Variant, StyledComponentConfig } from './typings';

0 comments on commit 1d8114f

Please sign in to comment.