forked from EduCraft/curriculum-project-hub
refactor(admin-web): polish Chinese UI and bits-ui controls
Map roles to Chinese labels, remove ADR/spec wording from the surface, and replace native selects/checkboxes/modals with bits-ui Select, Checkbox, Switch, Dialog, Label, and Collapsible.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<script lang="ts">
|
||||
import { Switch } from 'bits-ui';
|
||||
|
||||
let {
|
||||
checked = $bindable(false),
|
||||
disabled = false,
|
||||
class: className = '',
|
||||
onchange
|
||||
}: {
|
||||
checked?: boolean;
|
||||
disabled?: boolean;
|
||||
class?: string;
|
||||
onchange?: (checked: boolean) => void;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<Switch.Root
|
||||
class="saas-switch {className}"
|
||||
{disabled}
|
||||
{checked}
|
||||
onCheckedChange={(next) => {
|
||||
checked = next;
|
||||
onchange?.(next);
|
||||
}}
|
||||
>
|
||||
<Switch.Thumb class="saas-switch-thumb" />
|
||||
</Switch.Root>
|
||||
Reference in New Issue
Block a user