From 4838df315931bb883f704ec3e1abe2685f296cdf Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Sat, 22 Apr 2023 19:52:26 +0800 Subject: 😀 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/components/Feature.tsx | 88 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 docs/components/Feature.tsx (limited to 'docs/components/Feature.tsx') diff --git a/docs/components/Feature.tsx b/docs/components/Feature.tsx new file mode 100644 index 0000000..1a8a8b2 --- /dev/null +++ b/docs/components/Feature.tsx @@ -0,0 +1,88 @@ +import classNames from "classnames"; +import Link from "next/link"; +import type { Feature } from "../content/legacy-features"; + +type FeatureProps = { + feature: Omit; + // include feature description + detailed?: boolean; +}; + +const DetailedFeatureInner = (props: { feature: FeatureProps["feature"] }) => { + const { Icon, name, description } = props.feature; + return ( + <> +
+
+
+

+ {name} +

+
+
+

+ {description} +

+
+ + + ); +}; + +const featureWrapperClasses = `relative block overflow-hidden p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 no-underline text-black dark:text-white`; + +export const DetailedFeatureLink = (props: { + href: string; + feature: FeatureProps["feature"]; + target?: string; +}) => { + const { href, feature, ...rest } = props; + return ( + + + + ); +}; + +export default function Feature(props: FeatureProps) { + const { feature, detailed = false } = props; + const { Icon, name } = feature; + + if (detailed) { + return ( +
+ +
+ ); + } + + return ( +
+
+
+
+
{name}
+
+
+ ); +} -- cgit v1.2.3-70-g09d2