saleor-dashboard/src/components/Hr.tsx
Michał Droń 347e32ef4a
Replace classnames with clsx (#2759)
* Replace classnames with clsx

* Add clsx to package.json

* Remove classnames

* Remove classnames types

* Restrict classnames in eslint rules
2022-12-02 11:45:19 +01:00

31 lines
604 B
TypeScript

import { makeStyles } from "@saleor/macaw-ui";
import clsx from "clsx";
import React from "react";
interface HrProps {
className?: string;
}
const useStyles = makeStyles(
theme => ({
root: {
backgroundColor: theme.palette.divider,
border: "none",
display: "block",
height: 1,
margin: 0,
width: "100%",
},
}),
{ name: "Hr" },
);
export const Hr: React.FC<HrProps> = props => {
const { className } = props;
const classes = useStyles(props);
return <hr className={clsx(classes.root, className)} />;
};
Hr.displayName = "Hr";
export default Hr;