Skip to content

Commit

Permalink
Update formatting of avatar and image fields
Browse files Browse the repository at this point in the history
  • Loading branch information
raix committed Aug 27, 2024
1 parent 1522850 commit 97f02bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ui/components/AvatarImageField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useMemo, useState } from "react";
import { FileTrigger, type FileTriggerProps, InputContext } from "react-aria-components";
import { Avatar } from "./Avatar";
import { Button } from "./Button";
import { useMemo, useState } from "react";

type AvatarImageFieldProps = {
name: string;
Expand Down Expand Up @@ -30,7 +30,7 @@ export function AvatarImageField({
<div className="flex flex-col gap-3">
{label && <label>{label}</label>}
<InputContext.Provider value={inputContext}>
<div className="flex flex-row gap-4 items-center">
<div className="flex flex-row items-center gap-4">
<FileTrigger
{...props}
acceptedFileTypes={acceptedFileTypes}
Expand Down
6 changes: 3 additions & 3 deletions ui/components/ImageField.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMemo, useState } from "react";
import { FileTrigger, type FileTriggerProps, InputContext } from "react-aria-components";
import { Button } from "./Button";
import { useMemo, useState } from "react";

type ImageFieldProps = {
name: string;
Expand Down Expand Up @@ -29,7 +29,7 @@ export function ImageField({
<div className="flex flex-col gap-3">
{label && <label>{label}</label>}
<InputContext.Provider value={inputContext}>
<div className="flex flex-row gap-4 items-center">
<div className="flex flex-row items-center gap-4">
<FileTrigger
{...props}
acceptedFileTypes={acceptedFileTypes}
Expand All @@ -42,7 +42,7 @@ export function ImageField({
}
}}
>
<Button variant="icon" className="rounded-md w-fit h-fit p-1">
<Button variant="icon" className="h-fit w-fit rounded-md p-1">
<img src={previewUrl ?? imageUrl} alt={name} height={height} width={width} />
</Button>
</FileTrigger>
Expand Down

0 comments on commit 97f02bb

Please sign in to comment.