Merge pull request 'feat(ui): make save button clearer in sidebar section forms' (#4904) from ui/sidebar-section-save-button into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4904
This commit is contained in:
@@ -5,7 +5,7 @@ div.sidebar-section {
|
|||||||
@apply flex items-center justify-between px-1.5;
|
@apply flex items-center justify-between px-1.5;
|
||||||
|
|
||||||
& > div.controls {
|
& > div.controls {
|
||||||
@apply flex justify-end gap-2;
|
@apply flex items-center justify-end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ import {
|
|||||||
import { OperationNames, SuccessData } from "@/src/hooks/api";
|
import { OperationNames, SuccessData } from "@/src/hooks/api";
|
||||||
import { GenericSchema, GenericSchemaAsync } from "valibot";
|
import { GenericSchema, GenericSchemaAsync } from "valibot";
|
||||||
import { Typography } from "@/src/components/Typography/Typography";
|
import { Typography } from "@/src/components/Typography/Typography";
|
||||||
import { Button as KButton } from "@kobalte/core/button";
|
import { Button } from "@/src/components/Button/Button";
|
||||||
import Icon from "@/src/components/Icon/Icon";
|
|
||||||
|
|
||||||
import "./SidebarSection.css";
|
import "./SidebarSection.css";
|
||||||
import { Loader } from "../../components/Loader/Loader";
|
import { Loader } from "../../components/Loader/Loader";
|
||||||
@@ -83,24 +82,24 @@ export function SidebarSectionForm<
|
|||||||
</Typography>
|
</Typography>
|
||||||
<div class="controls h-4">
|
<div class="controls h-4">
|
||||||
{editing() && !formStore.submitting && (
|
{editing() && !formStore.submitting && (
|
||||||
<KButton type="submit">
|
<Button
|
||||||
<Icon
|
hierarchy="primary"
|
||||||
icon="Checkmark"
|
size="xs"
|
||||||
color="tertiary"
|
startIcon="Checkmark"
|
||||||
size="0.75rem"
|
ghost
|
||||||
inverted
|
type="submit"
|
||||||
/>
|
>
|
||||||
</KButton>
|
Save
|
||||||
|
</Button>
|
||||||
)}
|
)}
|
||||||
{editing() && formStore.submitting && <Loader />}
|
{editing() && formStore.submitting && <Loader />}
|
||||||
<KButton onClick={editOrClose}>
|
<Button
|
||||||
<Icon
|
hierarchy="primary"
|
||||||
icon={editing() ? "Close" : "Edit"}
|
ghost
|
||||||
color="tertiary"
|
size="xs"
|
||||||
size="0.75rem"
|
icon={editing() ? "Close" : "Edit"}
|
||||||
inverted
|
onClick={editOrClose}
|
||||||
/>
|
/>
|
||||||
</KButton>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
Reference in New Issue
Block a user