import { Button, Menu, Text, allureIcons } from "@allurereport/web-components"; import clsx from "clsx"; import type { FunctionalComponent } from "preact"; import { useState } from "preact/hooks"; import { MetadataButton } from "@/components/MetadataButton"; import type { MetadataProps } from "@/components/ReportMetadata"; import { useI18n } from "@/stores/locale"; import { copyToClipboard } from "@/utils/copyToClipboard"; import * as styles from "./styles.scss"; export const MetadataList: FunctionalComponent = ({ envInfo, size = "m", columns = 2, }) => { return (
{envInfo?.map(({ name, values, value }) => ( ))}
); }; export const TestResultMetadataList: FunctionalComponent = ({ groupedLabels, size = "m" }) => { return ( ); }; export const Metadata: FunctionalComponent = ({ envInfo }) => { const { t } = useI18n("ui"); const [isOpened, setIsOpen] = useState(true); return (
{isOpened && }
); }; const MetadataTooltip = (props: { value: string }) => { const { value } = props; const { t } = useI18n("ui"); return (
{value}
); }; const MetaDataKeyLabel: FunctionalComponent<{ size?: "s" | "m"; value: string; }> = ({ size = "s", value }) => { return ( (
{value}
)} >
); }; const MetadataKeyValue: FunctionalComponent<{ title: string; value?: string; values?: string[]; size?: "s" | "m"; }> = ({ title, value, values, size = "m" }) => { return (
{title} {values?.length ? (
{values.map((item) => ( ))}
) : (
)}
); };