Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiehenson committed Nov 18, 2024
1 parent a21aaa5 commit 66172c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/core/Icon/EncapsulatedIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React from "react";
import Icon, { IconProps } from "../Icon";
import { Theme } from "../styles/colors/types";
import { IconSize } from "./types";

type EncapsulatedIconProps = {
theme?: Theme;
className?: string;
innerClassName?: string;
iconSize?: IconSize;
Expand All @@ -14,7 +12,6 @@ const ICON_SIZE_REDUCTION = 12;
const ICON_HEIGHT_REDUCTION = 2;

const EncapsulatedIcon = ({
theme = "dark",
size = "40px",
iconSize,
className,
Expand All @@ -38,11 +35,11 @@ const EncapsulatedIcon = ({

return (
<div
className={`p-1 rounded-lg ${theme === "light" ? "bg-gradient-to-t" : "bg-gradient-to-b"} from-neutral-400 dark:from-neutral-900 ${className ?? ""}`}
className={`p-1 rounded-lg bg-gradient-to-t dark:bg-gradient-to-b ${className ?? "from-neutral-400 dark:from-neutral-900"}`}
style={{ width: size, height: size }}
>
<div
className={`flex items-center justify-center rounded-lg bg-neutral-200 dark:bg-neutral-1100 ${innerClassName ?? ""}`}
className={`flex items-center justify-center rounded-lg ${innerClassName ?? "bg-neutral-200 dark:bg-neutral-1100"}`}
style={{ height: computedIconHeight }}
>
<Icon size={computedIconSize} {...iconProps} />
Expand Down
2 changes: 0 additions & 2 deletions src/core/Pricing/PricingCards.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import React, { Fragment, useEffect, useRef, useState } from "react";
import throttle from "lodash.throttle";
import type { PricingDataFeature } from "./types";
import { Theme } from "../styles/colors/types";
import Icon from "../Icon";
import FeaturedLink from "../FeaturedLink";
import { IconName } from "../Icon/types";
import Tooltip from "../Tooltip";

export type PricingCardsProps = {
data: PricingDataFeature[];
theme?: Theme;
delimiter?: IconName | "blank";
};

Expand Down
14 changes: 13 additions & 1 deletion src/core/ProductTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,19 @@ const ProductTile = ({
>
<div className="flex gap-12 items-center">
{icon ? (
<EncapsulatedIcon name={icon} theme={selected ? "light" : "dark"} />
<EncapsulatedIcon
name={icon}
className={
selected
? "from-neutral-900 dark:from-neutral-400"
: "from-neutral-400 dark:from-neutral-900"
}
innerClassName={
selected
? "bg-neutral-1100 dark:bg-neutral-200"
: "bg-neutral-200 dark:bg-neutral-1100"
}
/>
) : null}
<div
className={clsx(
Expand Down

0 comments on commit 66172c9

Please sign in to comment.