forked from github/plane
5b0066140f
* chore: format all files in the project * fix: removing @types/react from dependencies * fix: adding prettier and eslint config * chore: format files * fix: upgrading turbo version * chore: ignoring warnings and adding todos * fix: updated the type of bubble menu item in the document editor * chore: format files --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
28 lines
567 B
TypeScript
28 lines
567 B
TypeScript
import React from "react";
|
|
|
|
type Props = {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
};
|
|
|
|
const Loader = ({ children, className = "" }: Props) => (
|
|
<div className={`${className} animate-pulse`} role="status">
|
|
{children}
|
|
</div>
|
|
);
|
|
|
|
type ItemProps = {
|
|
height?: string;
|
|
width?: string;
|
|
};
|
|
|
|
const Item: React.FC<ItemProps> = ({ height = "auto", width = "auto" }) => (
|
|
<div className="rounded-md bg-custom-background-80" style={{ height: height, width: width }} />
|
|
);
|
|
|
|
Loader.Item = Item;
|
|
|
|
Loader.displayName = "plane-ui-loader";
|
|
|
|
export { Loader };
|