``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
27 lines
512 B
TypeScript
27 lines
512 B
TypeScript
import { FC, HTMLAttributes } from "react";
|
|
|
|
import styles from "./styles.module.css";
|
|
|
|
export interface SummaryListProps extends HTMLAttributes<HTMLDivElement> {
|
|
title: string;
|
|
list: Array<string>;
|
|
}
|
|
|
|
export const SummaryList: FC<SummaryListProps> = ({
|
|
title,
|
|
list,
|
|
...props
|
|
}) => {
|
|
if (!list.length) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div {...props}>
|
|
<p className={styles.title}>
|
|
{title}: <span className={styles.listItems}>{list.join(", ")}</span>
|
|
</p>
|
|
</div>
|
|
);
|
|
};
|