feat: add icons to kmenu

This commit is contained in:
2023-08-02 13:11:17 +02:00
parent 32b6b04eb9
commit c7bcc0415a
13 changed files with 47 additions and 19 deletions

View File

@ -1,7 +1,9 @@
import IconExternalLink from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/external-link.tsx";
import { Star } from "@components/Stars.tsx";
import IconArrowNarrowLeft from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/arrow-narrow-left.tsx";
import IconEdit from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/edit.tsx";
import {
IconArrowNarrowLeft,
IconEdit,
IconExternalLink,
} from "@components/icons.tsx";
export function RecipeHero(
{ data, subline, backlink, editLink }: {
@ -29,6 +31,7 @@ export function RecipeHero(
<img
src={imageUrl}
alt="Recipe Banner"
style={{ objectPosition: "0% 30%" }}
class="absolute object-cover w-full h-full -z-10"
/>
)}
@ -57,7 +60,9 @@ export function RecipeHero(
class={`relative inset-x-0 py-4 px-8 ${imageUrl ? "py-8" : ""} `}
>
<div
class={`${imageUrl ? "noisy-gradient" : ""} flex gap-4 items-center ${
class={`${
imageUrl ? "noisy-gradient" : ""
} after:opacity-90 flex gap-4 items-center ${
imageUrl ? "pt-12" : ""
}`}
>

View File

@ -1,5 +1,4 @@
import IconStar from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/star.tsx";
import IconStarFilled from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/star-filled.tsx";
import { IconStar, IconStarFilled } from "@components/icons.tsx";
export const Star = (
{ max = 5, rating = 3 }: { max?: number; rating: number },

10
components/icons.tsx Normal file
View File

@ -0,0 +1,10 @@
export { default as IconStar } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/star.tsx";
export { default as IconStarFilled } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/star-filled.tsx";
export { default as IconExternalLink } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/external-link.tsx";
export { default as IconArrowNarrowLeft } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/arrow-narrow-left.tsx";
export { default as IconEdit } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/edit.tsx";
export { default as IconArrowLeft } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/arrow-left.tsx";
export { default as IconError404 } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/error-404.tsx";
export { default as IconSquareRoundedPlus } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/square-rounded-plus.tsx";
export { default as IconReportSearch } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/report-search.tsx";
export { default as IconRefresh } from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/refresh.tsx";