ksylvest/tights

View on GitHub
src/support/has.tsx

Summary

Maintainability
A
1 hr
Test Coverage
A
100%
import type { FC } from "react";
import { property } from "./property";

type Name = "addons" | "dropdown";

export const has = (Component: FC, name: Name): void => {
  property(name, Component, { [name]: !!name }, `.has-${name}`);
};