gitscope
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/features/users/components/pills/user-enabled-pill.tsx · v0.5.4
Source
1 d377c4c Dawsh 2y ago import { type FC } from "react";
2 d377c4c Dawsh 2y ago import { BooleanPill } from "@marzneshin/components";
3 d377c4c Dawsh 2y ago import { useTranslation } from "react-i18next";
4 d377c4c Dawsh 2y ago import { UserProp } from "@marzneshin/features/users";
5 d377c4c Dawsh 2y ago
6 d377c4c Dawsh 2y ago export const UserEnabledPill: FC<UserProp> = ({ user }) => {
7 d377c4c Dawsh 2y ago const { t } = useTranslation();
8 d377c4c Dawsh 2y ago return (
9 d377c4c Dawsh 2y ago <BooleanPill
10 d377c4c Dawsh 2y ago active={user.enabled}
11 d377c4c Dawsh 2y ago activeLabel={t('enabled')}
12 d377c4c Dawsh 2y ago inactiveLabel={t('disabled')}
13 d377c4c Dawsh 2y ago />
14 d377c4c Dawsh 2y ago )
15 d377c4c Dawsh 2y ago }