Skip to content

Commit

Permalink
biome_fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
epompeii committed May 19, 2024
1 parent 88b557a commit c884b01
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 58 deletions.
105 changes: 62 additions & 43 deletions services/console/src/components/console/billing/plan/Pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,47 @@ interface Props {
}

const Pricing = (props: Props) => {
const Free = <PlanPanel themeColor={props.themeColor} active={props.plan} plan={PlanLevel.Free} buttonText={props.freeText} handlePlanLevel={props.handleFree} />;
const Team = <PlanPanel themeColor={props.themeColor} active={props.plan} plan={PlanLevel.Team} buttonText={props.teamText} handlePlanLevel={props.handleTeam} />;
const Enterprise = <PlanPanel themeColor={props.themeColor} active={props.plan} plan={PlanLevel.Enterprise} buttonText={props.enterpriseText} handlePlanLevel={props.handleEnterprise} />;
const Free = (
<PlanPanel
themeColor={props.themeColor}
active={props.plan}
plan={PlanLevel.Free}
buttonText={props.freeText}
handlePlanLevel={props.handleFree}
/>
);
const Team = (
<PlanPanel
themeColor={props.themeColor}
active={props.plan}
plan={PlanLevel.Team}
buttonText={props.teamText}
handlePlanLevel={props.handleTeam}
/>
);
const Enterprise = (
<PlanPanel
themeColor={props.themeColor}
active={props.plan}
plan={PlanLevel.Enterprise}
buttonText={props.enterpriseText}
handlePlanLevel={props.handleEnterprise}
/>
);
return (
<div class="columns is-centered">
<Show when={props.hideFree} fallback={
<>
<div class="column is-3">
{Free}
</div>
<div class="column is-3">
{Team}
</div>
<div class="column is-3">
{Enterprise}
</div>
</>
}>
<div class="column is-6">
{Team}
</div>
<div class="column is-6">
{Enterprise}
</div>
<Show
when={props.hideFree}
fallback={
<>
<div class="column is-3">{Free}</div>
<div class="column is-3">{Team}</div>
<div class="column is-3">{Enterprise}</div>
</>
}
>
<div class="column is-6">{Team}</div>
<div class="column is-6">{Enterprise}</div>
</Show>
</div>
);
Expand Down Expand Up @@ -90,7 +107,7 @@ const PlanCopy = {
"Dedicated Onboarding",
],
},
}
};

const PlanPanel = (props: {
themeColor: string;
Expand All @@ -104,32 +121,34 @@ const PlanPanel = (props: {
<div class={`panel ${props.themeColor}`}>
<div class="panel-heading">
<div class="content has-text-centered">
<h2 class="title is-2">{plan.title}</h2>
<h3 class="subtitle is-1">{plan.price}</h3>
<br />
<sup>per benchmark result</sup>
<h2 class="title is-2">{plan.title}</h2>
<h3 class="subtitle is-1">{plan.price}</h3>
<br />
<sup>per benchmark result</sup>
</div>
</div>
<For each={plan.features}>
{(feature) => (
<Show when={feature === NO_FEATURE} fallback={
<div class="panel-block">
<span class="panel-icon">
<i class="fas fa-check" aria-hidden="true"></i>
</span>
{feature}
</div>
}>
<div class="panel-block">
{feature}
</div>
<Show
when={feature === NO_FEATURE}
fallback={
<div class="panel-block">
<span class="panel-icon">
<i class="fas fa-check" aria-hidden="true"></i>
</span>
{feature}
</div>
}
>
<div class="panel-block">{feature}</div>
</Show>
)
}
)}
</For>
<div class="panel-block">
<button
class={`button is-fullwidth ${props.plan === props.active && "is-primary"}`}
class={`button is-fullwidth ${
props.plan === props.active && "is-primary"
}`}
type="button"
onClick={(e) => {
e.preventDefault();
Expand All @@ -140,7 +159,7 @@ const PlanPanel = (props: {
</button>
</div>
</div>
)
}
);
};

export default Pricing;
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { themeSignal } from "../../navbar/theme/util";
import OnboardStepsInner, { type Props } from "./OnboardStepsInner"
import OnboardStepsInner, { type Props } from "./OnboardStepsInner";

const OnboardSteps = (props: Props) => {
const theme = themeSignal;

return <OnboardStepsInner {...props} theme={theme()} />;
}
};

export default OnboardSteps;
export default OnboardSteps;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import OnboardSteps, { type Props } from "./OnboardStepsInner"
import OnboardSteps, { type Props } from "./OnboardStepsInner";

const OnboardStepsFallback = (props: Props) => {
return <OnboardSteps {...props} />;
}
};

export default OnboardStepsFallback;
export default OnboardStepsFallback;
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ const OnboardSteps = (props: Props) => {
</div>
</div>
<br />
<nav class="breadcrumb is-centered has-bullet-separator" aria-label="breadcrumbs">
<nav
class="breadcrumb is-centered has-bullet-separator"
aria-label="breadcrumbs"
>
<ul>
<For
each={[
Expand All @@ -67,10 +70,17 @@ const OnboardSteps = (props: Props) => {
>
{(step) => (
<li class={props.step === step ? "is-active" : ""}>
<a href={stepHref(step)} aria-current={props.step === step ? "page" : undefined}>
<span class={`tag ${
props.step >= step ? "is-primary" : ""
}`}>{step}</span>
<a
href={stepHref(step)}
aria-current={props.step === step ? "page" : undefined}
>
<span
class={`tag ${
props.step >= step ? "is-primary" : ""
}`}
>
{step}
</span>
</a>
</li>
)}
Expand Down
3 changes: 1 addition & 2 deletions services/console/src/components/console/perf/PerfPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import PerfHeader from "./PerfHeader";
import PerfPlot from "./plot/PerfPlot";
import type { TabList } from "./plot/tab/PlotTab";
import { debounce } from "@solid-primitives/scheduled";
import { Theme, getTheme, } from "../../navbar/theme/theme";
import { Theme, getTheme } from "../../navbar/theme/theme";
import { themeSignal } from "../../navbar/theme/util";

// Perf query params
Expand Down Expand Up @@ -899,7 +899,6 @@ const PerfPanel = (props: Props) => {
DEBOUNCE_DELAY,
);


return (
<>
<Show when={!props.isEmbed}>
Expand Down
2 changes: 1 addition & 1 deletion services/console/src/components/navbar/theme/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ export const themeWordmark = (theme: Theme) => {
case Theme.Dark:
return BENCHER_WORDMARK_DARK;
}
}
};
2 changes: 1 addition & 1 deletion services/console/src/components/navbar/theme/util.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ setInterval(() => {
}
}, 100);
export const themeSignal = theme;
export const getThemeColor = createMemo(() => themeColor(theme()));
export const getThemeColor = createMemo(() => themeColor(theme()));

0 comments on commit c884b01

Please sign in to comment.