Skip to content

Commit

Permalink
Fix missing dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Allypost committed Aug 14, 2023
1 parent 10cc3e6 commit 73fc2cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/utils/kset-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const srcVariant = <

export const urlVariant = <
TSrc extends Src,
TVariant extends string | null,
TVariant extends DefaultUrlVariants | string | null,
TRet extends CssUrl<TSrc>,
>(
thumbSrc: TSrc,
Expand All @@ -59,9 +59,15 @@ export const urlVariant = <
return `url(${srcVariant(thumbSrc, variant)})` as const;
};

export enum DefaultUrlVariants {
Thumb = "fb_thumb",
Medium = "medium",
Original = "",
}

export const urlVariants = <
TSrc extends Src,
TVariant extends string | null,
TVariant extends DefaultUrlVariants | string | null,
TRet extends TSrc extends string ? string : null,
>(
thumbSrc: TSrc,
Expand Down

0 comments on commit 73fc2cf

Please sign in to comment.