move to RoleSelect file

This commit is contained in:
notmd
2023-01-16 12:31:05 +07:00
parent eec432758b
commit f181094fbf
2 changed files with 5 additions and 5 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
import { Select, SelectProps } from "@chakra-ui/react";
import { forwardRef } from "react";
import { Role, roles } from "src/lib/auth";
import { ElementOf } from "src/types/utils";
export const roles = ["general", "admin", "banned"] as const;
export type Role = ElementOf<typeof roles>;
type RoleSelectProps = Omit<SelectProps, "defaultValue"> & {
defaultValue?: Role;