Skip to content
New issue

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

fix(Restitution): fixed HeaderRestitution's type missing classModifier #988

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

JLou
Copy link
Contributor

@JLou JLou commented Oct 14, 2022

Related issue

Description of the issue

The outgoing type for HeaderRestitution was the base type and not the enhanced one with classModifier.
image

Important

Before creating a pull request run unit tests

$ npm test

# watch for changes
$ npm test -- --watch

# For a specific file (e.g., in packages/context/__tests__/command.test.js)
$ npm test -- --watch packages/action

Current workaround :

interface HeaderRestitutionProps {
  className?: string;
  title: React.ReactNode;
  subtitle?: React.ReactNode;
  rightTitle?: React.ReactNode;
  classModifier?: string | null;
  defaultClassName?: string | null;
}
const HeaderRestitutionFixed: (props: HeaderRestitutionProps) => JSX.Element = HeaderRestitution as never;
        
const MyComponent = () => (
      <HeaderRestitutionFixed
          classModifier="stackedRight" // no error
      />
);

@arnaudforaison arnaudforaison merged commit e1546c1 into AxaFrance:master Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants