You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
homepage/src/components/widgets/widget/resources.jsx

23 lines
818 B

import classNames from "classnames";
import ContainerLink from "./container_link";
import Resource from "./resource";
import Raw from "./raw";
import WidgetLabel from "./widget_label";
export default function Resources({ options, children, target, additionalClassNames }) {
const widgetParts = [].concat(...children);
const addedClassNames = classNames("information-widget-resources", additionalClassNames);
return (
<ContainerLink options={options} target={target} additionalClassNames={addedClassNames}>
<Raw>
<div className="flex flex-row self-center flex-wrap justify-between">
{widgetParts.filter((child) => child && child.type === Resource)}
</div>
{widgetParts.filter((child) => child && child.type === WidgetLabel)}
</Raw>
</ContainerLink>
);
}