Skip to content

Commit 6a6334a

Browse files
author
jdv
committed
fixed biom warning
1 parent 0daf996 commit 6a6334a

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

crowdsec-docs/src/components/premium-upgrade/feature-card.tsx

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ export const FeatureCard = ({
4949
const colors = categoryColors[category];
5050

5151
// Generate ID from title if not explicitly provided
52-
const generatedId = id || title.toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]/g, '');
52+
const generatedId =
53+
id ||
54+
title
55+
.toLowerCase()
56+
.replace(/\s+/g, "-")
57+
.replace(/[^\w-]/g, "");
5358

5459
const cardContent = (
5560
<div
@@ -89,11 +94,7 @@ export const FeatureCard = ({
8994
<span className="font-semibold text-primary">{comparison.after}</span>
9095
</div>
9196
)}
92-
{link && (
93-
<div className="mt-3 text-sm font-medium text-primary hover:underline">
94-
Learn more →
95-
</div>
96-
)}
97+
{link && <div className="mt-3 text-sm font-medium text-primary hover:underline">Learn more →</div>}
9798
</div>
9899
);
99100

@@ -122,10 +123,18 @@ export interface HighlightCardProps {
122123

123124
export const HighlightCard = ({ id, title, description, stats, link, category = "protection" }: HighlightCardProps): React.JSX.Element => {
124125
// Generate ID from title if not explicitly provided
125-
const generatedId = id || title.toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]/g, '');
126+
const generatedId =
127+
id ||
128+
title
129+
.toLowerCase()
130+
.replace(/\s+/g, "-")
131+
.replace(/[^\w-]/g, "");
126132

127133
const content = (
128-
<div id={generatedId} className="border border-solid border-primary/30 rounded-lg p-6 bg-gradient-to-r from-primary/5 to-transparent hover:shadow-md transition-all">
134+
<div
135+
id={generatedId}
136+
className="border border-solid border-primary/30 rounded-lg p-6 bg-gradient-to-r from-primary/5 to-transparent hover:shadow-md transition-all"
137+
>
129138
<h4 className="font-semibold text-lg mb-2 text-gray-900 dark:text-gray-900">{title}</h4>
130139
<p className="text-sm text-gray-600 dark:text-gray-700 mb-4 leading-relaxed">{description}</p>
131140
{stats && stats.length > 0 && (
@@ -138,11 +147,7 @@ export const HighlightCard = ({ id, title, description, stats, link, category =
138147
))}
139148
</div>
140149
)}
141-
{link && (
142-
<div className="mt-4 text-sm font-medium text-primary hover:underline">
143-
Learn more →
144-
</div>
145-
)}
150+
{link && <div className="mt-4 text-sm font-medium text-primary hover:underline">Learn more →</div>}
146151
</div>
147152
);
148153

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
export { FeatureCard, HighlightCard } from "./feature-card";
21
export type { FeatureCardProps, HighlightCardProps } from "./feature-card";
3-
4-
export { PersonaSelector } from "./persona-selector";
2+
export { FeatureCard, HighlightCard } from "./feature-card";
53
export type { PersonaOption as PersonaSelectorOption, PersonaSelectorProps } from "./persona-selector";
6-
7-
export { PersonaTabsHeader } from "./persona-tabs";
4+
export { PersonaSelector } from "./persona-selector";
85
export type { PersonaOption as PersonaTabsOption, PersonaTabsHeaderProps } from "./persona-tabs";
9-
10-
export { TabsWithPersona } from "./tabs-with-persona";
6+
export { PersonaTabsHeader } from "./persona-tabs";
117
export type { PersonaOption, TabsWithPersonaProps } from "./tabs-with-persona";
8+
export { TabsWithPersona } from "./tabs-with-persona";

crowdsec-docs/src/components/premium-upgrade/tabs-with-persona.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Tabs from "@theme/Tabs";
21
import TabItem from "@theme/TabItem";
3-
import React, { useState } from "react";
2+
import Tabs from "@theme/Tabs";
43
import type { ReactElement } from "react";
4+
import React, { useState } from "react";
55

66
export interface PersonaOption {
77
value: string;

crowdsec-docs/src/css/premium-upgrade.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858

5959
.feature-card-highlight::before {
60-
content: '';
60+
content: "";
6161
position: absolute;
6262
top: 0;
6363
left: 0;

0 commit comments

Comments
 (0)