alvarotrigo / react-fullpage

Official React.js wrapper for fullPage.js https://alvarotrigo.com/react-fullpage/
GNU General Public License v3.0
1.29k stars 178 forks source link

Property 'credits' is not recognized as an available option #391

Closed yunchanpaik closed 1 year ago

yunchanpaik commented 1 year ago

Description

Property 'credits' is not recognized as an available option. It seems like it's not included in the fullpageOptions in index.d.ts

No overload matches this call.
  Overload 1 of 2, '(props: FullPageProps | Readonly<FullPageProps>): ReactFullpage', gave the following error.
    Type '{ licenseKey: string; scrollingSpeed: number; credits: { enabled: boolean; }; render: ({ state, fullpageApi }: { state: any; fullpageApi: fullpageApi; }) => Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactFullpage> & Readonly<FullPageProps>'.
      Property 'credits' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactFullpage> & Readonly<FullPageProps>'.
  Overload 2 of 2, '(props: FullPageProps, context: any): ReactFullpage', gave the following error.
    Type '{ licenseKey: string; scrollingSpeed: number; credits: { enabled: boolean; }; render: ({ state, fullpageApi }: { state: any; fullpageApi: fullpageApi; }) => Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactFullpage> & Readonly<FullPageProps>'.
      Property 'credits' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactFullpage> & Readonly<FullPageProps>'.

Steps to reproduce it

Include credits attribute to ReactFullpage component:

<ReactFullpage
      licenseKey='REDACTED'
      scrollingSpeed={500}
      credits={{ enabled: false }}

Versions

@fullpage/react-fullpage@0.1.32 fullpage.js@4.0.16

alvarotrigo commented 1 year ago

Good catch! 👍 I added the fix on the dev branch

alvarotrigo commented 1 year ago

I'll try to take a look at this other issue before created a new release.

yunchanpaik commented 1 year ago

Wow! Thank you for such a quick turnaround :)

alvarotrigo commented 1 year ago

Merged!

yunchanpaik commented 1 year ago

Just realized that credits is not marked optional. Not a problem for me since I intend to add that attribute but just in case people start having an issue after upgrading the package.

alvarotrigo commented 1 year ago

Ups! I'll fix that!

alvarotrigo commented 1 year ago

Thanks for the heads-up! 👍