mirror of
https://github.com/colanode/colanode.git
synced 2025-12-29 00:25:03 +01:00
Fix button types
This commit is contained in:
@@ -105,6 +105,7 @@ export const ChannelCreateDialog = ({
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
disabled={isPending}
|
||||
onClick={handleCancel}
|
||||
|
||||
@@ -100,7 +100,7 @@ export const DatabaseCreateDialog = ({
|
||||
/>
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={handleCancel}>
|
||||
<Button type="button" variant="outline" onClick={handleCancel}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isPending}>
|
||||
|
||||
@@ -128,7 +128,12 @@ export const FieldCreatePopover = () => {
|
||||
<FieldAttrs />
|
||||
</div>
|
||||
<div className="mt-2 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
|
||||
<Button variant="outline" size="sm" onClick={handleCancelClick}>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={handleCancelClick}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" size="sm" disabled={isPending}>
|
||||
|
||||
@@ -32,6 +32,7 @@ export const FieldSelect = ({ fields, value, onChange }: FieldSelectProps) => {
|
||||
<Popover open={open} onOpenChange={setOpen} modal={true}>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
role="combobox"
|
||||
aria-expanded={open}
|
||||
|
||||
@@ -93,6 +93,7 @@ export const FieldDataTypeSelect = ({
|
||||
<Popover open={open} onOpenChange={setOpen} modal={true}>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
role="combobox"
|
||||
aria-expanded={open}
|
||||
|
||||
@@ -45,6 +45,7 @@ export const ViewBooleanFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -49,6 +49,7 @@ export const ViewCreatedAtFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -52,6 +52,7 @@ export const ViewDateFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -51,6 +51,7 @@ export const ViewEmailFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -55,6 +55,7 @@ export const ViewMultiSelectFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -51,6 +51,7 @@ export const ViewNumberFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -51,6 +51,7 @@ export const ViewPhoneFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -55,6 +55,7 @@ export const ViewSelectFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -28,6 +28,7 @@ export const ViewSorts = () => {
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -51,6 +51,7 @@ export const ViewTextFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -51,6 +51,7 @@ export const ViewUrlFieldFilter = ({
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="border-dashed text-xs text-muted-foreground"
|
||||
|
||||
@@ -64,7 +64,7 @@ export const TableViewSettingsPopover = () => {
|
||||
});
|
||||
}}
|
||||
>
|
||||
<Button variant="outline" size="icon">
|
||||
<Button type="button" variant="outline" size="icon">
|
||||
<Avatar
|
||||
id={tableView.id}
|
||||
name={tableView.name}
|
||||
|
||||
@@ -253,7 +253,7 @@ export const ViewCreateDialog = ({
|
||||
)}
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={handleCancel}>
|
||||
<Button type="button" variant="outline" onClick={handleCancel}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isPending}>
|
||||
|
||||
@@ -71,18 +71,18 @@ export const FolderContainer = ({ nodeId }: FolderContainerProps) => {
|
||||
<div className="flex h-full max-h-full flex-col gap-4 overflow-y-auto px-10 pt-4">
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="flex flex-row gap-2">
|
||||
<Button variant="outline" onClick={openFileDialog}>
|
||||
<Button type="button" variant="outline" onClick={openFileDialog}>
|
||||
<Icon name="upload-line" className="mr-1" /> Upload
|
||||
</Button>
|
||||
</div>
|
||||
<div className="flex flex-row gap-2">
|
||||
<Button variant="outline" size="icon" disabled>
|
||||
<Button type="button" variant="outline" size="icon" disabled>
|
||||
<Icon name="filter-line" />
|
||||
</Button>
|
||||
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="outline" size="icon">
|
||||
<Button type="button" variant="outline" size="icon">
|
||||
<Icon name={currentLayout?.icon} />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
|
||||
@@ -101,7 +101,7 @@ export const FolderCreateDialog = ({
|
||||
/>
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={handleCancel}>
|
||||
<Button type="button" variant="outline" onClick={handleCancel}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isPending}>
|
||||
|
||||
@@ -101,7 +101,7 @@ export const PageCreateDialog = ({
|
||||
/>
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={handleCancel}>
|
||||
<Button type="button" variant="outline" onClick={handleCancel}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isPending}>
|
||||
|
||||
@@ -42,7 +42,11 @@ export const ServerCreateDialog = ({
|
||||
/>
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={() => onOpenChange(false)}>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
onClick={() => onOpenChange(false)}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@@ -56,6 +56,14 @@ export const SpaceCreateDialog = ({
|
||||
};
|
||||
|
||||
const handleSubmit = async (values: z.infer<typeof formSchema>) => {
|
||||
if (isPending) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (values.name.length < 3) {
|
||||
return;
|
||||
}
|
||||
|
||||
mutate({
|
||||
input: {
|
||||
type: 'space_create',
|
||||
@@ -116,7 +124,7 @@ export const SpaceCreateDialog = ({
|
||||
/>
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={handleCancel}>
|
||||
<Button type="button" variant="outline" onClick={handleCancel}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isPending}>
|
||||
|
||||
@@ -106,7 +106,7 @@ export const SpaceUpdateForm = ({ id }: SpaceUpdateFormProps) => {
|
||||
<div className="space-y-4 pb-4">
|
||||
<div className="flex flex-row items-end gap-4">
|
||||
<AvatarPopover onPick={(avatar) => form.setValue('avatar', avatar)}>
|
||||
<Button variant="outline" size="icon">
|
||||
<Button type="button" variant="outline" size="icon">
|
||||
<Avatar
|
||||
id={id}
|
||||
name={name}
|
||||
|
||||
@@ -43,7 +43,7 @@ export const BreadcrumbItemPopover = ({
|
||||
});
|
||||
}}
|
||||
>
|
||||
<Button variant="outline" size="icon">
|
||||
<Button type="button" variant="outline" size="icon">
|
||||
<Avatar
|
||||
size="small"
|
||||
id={node.id}
|
||||
|
||||
Reference in New Issue
Block a user