mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-15 13:42:08 +03:00
1d7bc8a5bc
* remove duplicate import * 🚧 add new linter configuration * 🧑💻 add and run prettier * 🐛 add babel parser for linter * 🧑💻 add lint-fix command * 🚨 use lint-fix * 🚨 remove 'FC' as a type. Use const and JSX.Element * 🚨 enforce arrow function rule from linter * 🔥 delete unused file * 🚨 adding /* eslint-disable */ in failing files * 💩 add ts-expect-error to Victory components
32 lines
814 B
TypeScript
32 lines
814 B
TypeScript
/* eslint-disable */
|
|
import { forwardRef, HTMLAttributes, LegacyRef } from "react";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
type DividerProps = HTMLAttributes<HTMLDivElement> & {
|
|
text?: string;
|
|
};
|
|
|
|
const Divider = forwardRef(
|
|
({ className, text, ...props }: DividerProps, ref): JSX.Element => {
|
|
return (
|
|
<div
|
|
ref={ref as LegacyRef<HTMLDivElement>}
|
|
className={cn("flex items-center justify-center", className)}
|
|
{...props}
|
|
>
|
|
<hr className="border-t border-gray-300 w-12" />
|
|
{text !== undefined && (
|
|
<p className="px-3 text-center text-gray-500 dark:text-white">
|
|
{text}
|
|
</p>
|
|
)}
|
|
<hr className="border-t border-gray-300 w-12" />
|
|
</div>
|
|
);
|
|
}
|
|
);
|
|
Divider.displayName = "AnimatedCard";
|
|
|
|
export { Divider };
|