We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forward refs for any compose primitives (like compose, composeU, withHOCConstructor, etc)
compose
composeU
withHOCConstructor
Example of current code:
import React from 'react'; import { cnIcon, IIconProps } from 'react-elegant-ui/esm/components/Icon/Icon'; import { withHOCConstructor } from 'react-elegant-ui/esm/lib/compose'; export type IIconModHasGlyph = { hasGlyph?: boolean; }; export const withModHasGlyph = withHOCConstructor<IIconModHasGlyph, IIconProps>( { matchProps: { hasGlyph: true }, matchOnlyProps: ['hasGlyph'] }, (Component) => (props) => ( <Component {...props} className={cnIcon({ hasGlyph: true }, [props.className])} /> ), );
Example of possible solution
export const withModHasGlyph = withHOCConstructor<IIconModHasGlyph, IIconProps>( { matchProps: { hasGlyph: true }, matchOnlyProps: ['hasGlyph'] }, (Component) => (props, ref) => ( <Component ref={ref} {...props} className={cnIcon({ hasGlyph: true }, [props.className])} /> ), );
The text was updated successfully, but these errors were encountered:
Related to #166
Sorry, something went wrong.
No branches or pull requests
Forward refs for any compose primitives (like
compose
,composeU
,withHOCConstructor
, etc)Examples
Example of current code:
Example of possible solution
The text was updated successfully, but these errors were encountered: