Add tailwind plugin for prettier (#592)

This commit is contained in:
Salih Altun
2024-07-11 21:29:47 +03:00
committed by GitHub
parent 4e49d84f1e
commit 102d73b60e
39 changed files with 206 additions and 127 deletions

View File

@@ -99,7 +99,7 @@ function FileUpload({ value, onChange }: Props) {
<Label
htmlFor={inputId}
className={cn(
"flex w-full cursor-pointer border border-dashed items-center justify-center py-8",
"flex w-full cursor-pointer items-center justify-center border border-dashed py-8",
{
"border-slate-500": highlight,
},
@@ -144,7 +144,7 @@ function FileUpload({ value, onChange }: Props) {
accept=".csv"
className="hidden"
/>
<div className="max-w-full truncate flex gap-2">
<div className="flex max-w-full gap-2 truncate">
{uploadFileMutation.isPending && (
<ReloadIcon className="mr-2 h-4 w-4 animate-spin" />
)}
@@ -156,7 +156,7 @@ function FileUpload({ value, onChange }: Props) {
</div>
</Label>
</div>
<div className="flex flex-col items-center justify-center before:flex before:content-[''] before:bg-slate-600">
<div className="flex flex-col items-center justify-center before:flex before:bg-slate-600 before:content-['']">
OR
</div>
<div className="w-1/2">
@@ -181,7 +181,7 @@ function FileUpload({ value, onChange }: Props) {
if (typeof value === "string") {
return (
<div className="flex gap-4 items-center">
<div className="flex items-center gap-4">
<span>{value}</span>
<Button onClick={() => reset()}>Change</Button>
</div>
@@ -190,7 +190,7 @@ function FileUpload({ value, onChange }: Props) {
if (typeof value === "object" && file && "s3uri" in value) {
return (
<div className="flex gap-4 items-center">
<div className="flex items-center gap-4">
<a href={value.presignedUrl} className="underline">
<span>{file.name}</span>
</a>

View File

@@ -38,7 +38,7 @@ function ZoomableImage(props: HTMLImageElementProps) {
{modalOpen && (
<div
className={clsx(
"fixed inset-0 z-50 flex justify-center bg-black bg-opacity-75 overflow-auto p-16",
"fixed inset-0 z-50 flex justify-center overflow-auto bg-black bg-opacity-75 p-16",
{
"items-center": !zoom,
"items-baseline": zoom,
@@ -46,7 +46,7 @@ function ZoomableImage(props: HTMLImageElementProps) {
)}
>
<span
className="absolute top-4 right-4 text-white text-4xl cursor-pointer"
className="absolute right-4 top-4 cursor-pointer text-4xl text-white"
onClick={closeModal}
>
&times;
@@ -55,9 +55,9 @@ function ZoomableImage(props: HTMLImageElementProps) {
{...props}
onClick={() => setZoom(!zoom)}
className={clsx({
"min-h-full object-contain h-full w-full m-0 cursor-zoom-in max-h-full max-w-full":
"m-0 h-full max-h-full min-h-full w-full max-w-full cursor-zoom-in object-contain":
!zoom,
"min-h-full object-contain m-0 cursor-zoom-out max-w-none max-h-none mr-auto ml-auto":
"m-0 ml-auto mr-auto max-h-none min-h-full max-w-none cursor-zoom-out object-contain":
zoom,
})}
/>

View File

@@ -23,7 +23,7 @@ const CardHeader = React.forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("flex flex-col space-y-1.5 p-4 bg-muted/40", className)}
className={cn("flex flex-col space-y-1.5 bg-muted/40 p-4", className)}
{...props}
/>
));

View File

@@ -204,7 +204,7 @@ const CarouselPrevious = React.forwardRef<
variant={variant}
size={size}
className={cn(
"absolute h-8 w-8 rounded-full",
"absolute h-8 w-8 rounded-full",
orientation === "horizontal"
? "-left-12 top-1/2 -translate-y-1/2"
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",

View File

@@ -19,7 +19,7 @@ const DialogOverlay = React.forwardRef<
<DialogPrimitive.Overlay
ref={ref}
className={cn(
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className,
)}
{...props}

View File

@@ -17,7 +17,7 @@ function HiddenCopyableInput({ value }: Props) {
return (
<div className="relative w-full">
<Input value={inputValue} className="h-10" readOnly />
<div className="absolute flex inset-y-0 items-center right-1">
<div className="absolute inset-y-0 right-1 flex items-center">
<Button
size="sm"
variant="secondary"