aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/components/image/ImageFigure.tsx
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-11-03 21:13:33 +0800
committer简律纯 <i@jyunko.cn>2023-11-03 21:13:33 +0800
commit9f0d43fe099a95ab1516ae951dcb60a89e76a5a5 (patch)
tree51614fe47bff8bb11028a07d4a35c34c9ff6594a /docs/components/image/ImageFigure.tsx
parent8f135707d069c900e055dae71e69909d6b9a41bb (diff)
downloadHydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.tar.gz
HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.zip
chore: delete useless codes
Diffstat (limited to 'docs/components/image/ImageFigure.tsx')
-rw-r--r--docs/components/image/ImageFigure.tsx40
1 files changed, 0 insertions, 40 deletions
diff --git a/docs/components/image/ImageFigure.tsx b/docs/components/image/ImageFigure.tsx
deleted file mode 100644
index b90237e..0000000
--- a/docs/components/image/ImageFigure.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import React from "react";
-import Image from "next/image";
-
-type ImageProps = Parameters<typeof Image>[0];
-
-export type ImageFigureProps = ImageProps & {
- caption?: string;
- margin?: number;
- captionSpacing?: number;
- shadow?: boolean;
- borderRadius?: boolean;
-};
-
-export function ImageFigure(props: ImageFigureProps): React.ReactNode {
- const {
- caption,
- margin = 40,
- captionSpacing = null,
- shadow = false,
- borderRadius = false,
- ...rest
- } = props;
-
- return (
- <figure className="block text-center" style={{ margin: `${margin}px 0` }}>
- <div className="relative inline-block w-full max-w-full overflow-hidden border-box text-[0px]">
- {/* eslint-disable-next-line jsx-a11y/alt-text */}
- <Image {...rest} />
- </div>
- {caption && (
- <figcaption
- className="m-0 text-xs text-center text-gray-500"
- style={captionSpacing ? { marginTop: captionSpacing } : {}}
- >
- {caption}
- </figcaption>
- )}
- </figure>
- );
-}