https://dev.kronoz.win/r/marzneshin.git
| 1 |
4708fcb |
Dawsh |
2y ago |
import { type FC } from "react"; |
| 2 |
4708fcb |
Dawsh |
2y ago |
import { BooleanPill } from "@marzneshin/components"; |
| 3 |
4708fcb |
Dawsh |
2y ago |
import { useTranslation } from "react-i18next"; |
| 4 |
4708fcb |
Dawsh |
2y ago |
import { AdminProp } from "@marzneshin/features/admins"; |
| 5 |
4708fcb |
Dawsh |
2y ago |
|
| 6 |
4708fcb |
Dawsh |
2y ago |
export const AdminPermissionPill: FC<AdminProp> = ({ admin }) => { |
| 7 |
4708fcb |
Dawsh |
2y ago |
const { t } = useTranslation(); |
| 8 |
4708fcb |
Dawsh |
2y ago |
return ( |
| 9 |
4708fcb |
Dawsh |
2y ago |
<BooleanPill |
| 10 |
4708fcb |
Dawsh |
2y ago |
active={admin.is_sudo} |
| 11 |
4708fcb |
Dawsh |
2y ago |
activeLabel={t('sudo')} |
| 12 |
4708fcb |
Dawsh |
2y ago |
activeVariant="royal" |
| 13 |
4708fcb |
Dawsh |
2y ago |
inactiveLabel={t('normal')} |
| 14 |
4708fcb |
Dawsh |
2y ago |
inactiveVariant="warning" |
| 15 |
4708fcb |
Dawsh |
2y ago |
/> |
| 16 |
4708fcb |
Dawsh |
2y ago |
) |
| 17 |
4708fcb |
Dawsh |
2y ago |
} |