Skip to content

Commit

Permalink
updated prop name
Browse files Browse the repository at this point in the history
  • Loading branch information
ANKUR DWIVEDI authored and ANKUR DWIVEDI committed Feb 19, 2024
1 parent dfd09c4 commit 4b16cdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/IKContext/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { createContext } from 'react';
import { InferProps } from 'prop-types';
import ImageKit from 'imagekit-javascript';
import { IKContextCombinedProps, IKContextExtractedProps } from "./props";
import { IKContextProps, IKContextExtractedProps } from "./props";

// Create the context
export const ImageKitContext = createContext<IKContextExtractedProps>({});
Expand All @@ -16,7 +16,7 @@ export const ImageKitContext = createContext<IKContextExtractedProps>({});
* <Image src={link}/>
*</IKContext>
*/
const IKContext = (props: React.PropsWithChildren<IKContextCombinedProps>) => {
const IKContext = (props: React.PropsWithChildren<IKContextProps>) => {

const extractContextOptions = (mergedOptions: InferProps<IKContextExtractedProps>) => {
var result: IKContextExtractedProps = {};
Expand Down
6 changes: 3 additions & 3 deletions src/components/IKContext/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ const Props = {
authenticator: PropTypes.func
};

export const IKContextCombinedProps = {
export const IKContextProps = {
...Props,
transformationPosition: PropTypes.oneOf(['path', 'query']),
};

export const IKContextExtractedProps = {
...IKContextCombinedProps,
...IKContextProps,
ikClient: PropTypes.instanceOf(ImageKit),
};

export type IKContextCombinedProps = InferProps<typeof IKContextCombinedProps> & {
export type IKContextProps = InferProps<typeof IKContextProps> & {
urlEndpoint?: string;
};

Expand Down

0 comments on commit 4b16cdb

Please sign in to comment.