43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
"use client";
|
|
/*
|
|
* Documentation:
|
|
* Loader — https://app.subframe.com/f023064a5ca0/library?component=Loader_f2e570c8-e463-45c2-aae9-a960146bc5d5
|
|
*/
|
|
|
|
import React from "react";
|
|
import * as SubframeCore from "@subframe/core";
|
|
import * as SubframeUtils from "../../utils";
|
|
|
|
export interface LoaderRootProps
|
|
extends React.ComponentProps<typeof SubframeCore.Loader> {
|
|
size?: "small" | "medium" | "large";
|
|
className?: string;
|
|
}
|
|
|
|
const LoaderRoot = React.forwardRef<
|
|
React.ElementRef<typeof SubframeCore.Loader>,
|
|
LoaderRootProps
|
|
>(function LoaderRoot(
|
|
{ size = "medium", className, ...otherProps }: LoaderRootProps,
|
|
ref
|
|
) {
|
|
return (
|
|
<SubframeCore.Loader
|
|
className={SubframeUtils.twClassNames(
|
|
"group/f2e570c8 font-['Inter'] text-[14px] font-[400] leading-[20px] text-[#2563eb]",
|
|
{
|
|
"font-['Inter'] text-[20px] font-[600] leading-[24px] tracking-normal":
|
|
size === "large",
|
|
"font-['Inter'] text-[12px] font-[400] leading-[16px] tracking-normal":
|
|
size === "small",
|
|
},
|
|
className
|
|
)}
|
|
ref={ref}
|
|
{...otherProps}
|
|
/>
|
|
);
|
|
});
|
|
|
|
export const Loader = LoaderRoot;
|