import React from 'react';
import {ConsentActionType} from '@signatu/consent';
import {ConsentActionProps} from '../components/consentAction';

/** Crate a new class that uses the ConsentActionType */
export const makeTypedComponent = (Component: React.ComponentType<any>, type: ConsentActionType): React.ComponentType<ConsentActionProps>  => class extends React.Component<ConsentActionProps> {
    render() {
      return <Component type={type} {...this.props} />
    }
}
