Bin
2025-12-17 21f0498f62ada55651f4d232327e15fc47f498b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { cn } from "../../utils/bem";
import "./DescriptionList.scss";
import { IconInfoOutline } from "@humansignal/icons";
import { Tooltip } from "@humansignal/ui";
 
export const DescriptionList = ({ style, className, children }) => {
  return (
    <dl className={cn("dl").mix(className)} style={style}>
      {children}
    </dl>
  );
};
 
DescriptionList.Item = ({ retmClassName, descriptionClassName, term, descriptionStyle, termStyle, children, help }) => {
  return (
    <>
      <dt className={cn("dl").elem("dt").mix(retmClassName)} style={descriptionStyle}>
        {term}{" "}
        {help ? (
          <Tooltip style={{ whiteSpace: "pre-wrap" }} title={help}>
            <IconInfoOutline className={cn("help-icon")} width="14" height="14" />
          </Tooltip>
        ) : (
          ""
        )}
      </dt>
      <dd className={cn("dl").elem("dd").mix(descriptionClassName)} style={termStyle}>
        {children}
      </dd>
    </>
  );
};