Skip to content

Commit

Permalink
Merge branch 'issue/9842/discussion-ui' of https://github.com/rajku-d…
Browse files Browse the repository at this point in the history
…ev/care_fe into issue/9842/discussion-ui
  • Loading branch information
rajku-dev committed Feb 10, 2025
2 parents e50a2a7 + ccabdb4 commit eeb3f71
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
6 changes: 4 additions & 2 deletions src/components/Patient/PatientDetailsTab/PatientUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { t } from "i18next";
import { useState } from "react";
import { toast } from "sonner";

import { cn } from "@/lib/utils";

import CareIcon from "@/CAREUI/icons/CareIcon";

import {
Expand All @@ -16,7 +18,7 @@ import {
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import { Button, buttonVariants } from "@/components/ui/button";
import {
Select,
SelectContent,
Expand Down Expand Up @@ -287,7 +289,7 @@ export const PatientUsers = (props: PatientProps) => {
<AlertDialogAction
data-cy="patient-user-remove-confirm-button"
onClick={() => removeUser(user.id)}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
className={cn(buttonVariants({ variant: "destructive" }))}
>
{t("remove")}
</AlertDialogAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import { Button, buttonVariants } from "@/components/ui/button";
import {
Collapsible,
CollapsibleContent,
Expand Down Expand Up @@ -201,7 +201,7 @@ export function MedicationRequestQuestion({
<AlertDialogCancel>{t("cancel")}</AlertDialogCancel>
<AlertDialogAction
onClick={confirmRemoveMedication}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
className={cn(buttonVariants({ variant: "destructive" }))}
>
{t("remove")}
</AlertDialogAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import { Button, buttonVariants } from "@/components/ui/button";
import {
Collapsible,
CollapsibleContent,
Expand Down Expand Up @@ -204,7 +204,7 @@ export function MedicationStatementQuestion({
<AlertDialogCancel>{t("cancel")}</AlertDialogCancel>
<AlertDialogAction
onClick={confirmRemoveMedication}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
className={cn(buttonVariants({ variant: "destructive" }))}
>
{t("remove")}
</AlertDialogAction>
Expand Down
6 changes: 4 additions & 2 deletions src/components/Questionnaire/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { useMutation, useQuery } from "@tanstack/react-query";
import { useNavigate } from "raviger";
import { useState } from "react";

import { cn } from "@/lib/utils";

import CareIcon from "@/CAREUI/icons/CareIcon";

import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
Expand All @@ -16,7 +18,7 @@ import {
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Button, buttonVariants } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import {
DropdownMenu,
Expand Down Expand Up @@ -218,7 +220,7 @@ export function QuestionnaireShow({ id }: QuestionnaireShowProps) {
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={handleDelete}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
className={cn(buttonVariants({ variant: "destructive" }))}
disabled={isPending}
>
{isPending ? "Deleting..." : "Delete"}
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Apps/PlugConfigEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { useMutation, useQuery } from "@tanstack/react-query";
import { useNavigate } from "raviger";
import { useEffect, useState } from "react";

import { cn } from "@/lib/utils";

import CareIcon from "@/CAREUI/icons/CareIcon";

import {
Expand All @@ -15,7 +17,7 @@ import {
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import { Button, buttonVariants } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";

Expand Down Expand Up @@ -108,7 +110,7 @@ export function PlugConfigEdit({ slug }: Props) {
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={handleDelete}
className="bg-red-600 hover:bg-red-700"
className={cn(buttonVariants({ variant: "destructive" }))}
>
Delete
</AlertDialogAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { useState } from "react";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";

import { cn } from "@/lib/utils";

import {
AlertDialog,
AlertDialogAction,
Expand All @@ -14,7 +16,7 @@ import {
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import { Button, buttonVariants } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import {
Select,
Expand Down Expand Up @@ -230,7 +232,7 @@ export default function EditUserRoleSheet({
<AlertDialogCancel>{t("cancel")}</AlertDialogCancel>
<AlertDialogAction
onClick={() => removeRole()}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
className={cn(buttonVariants({ variant: "destructive" }))}
>
{t("remove")}
</AlertDialogAction>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Organization/components/EditUserRoleSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { useState } from "react";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";

import { cn } from "@/lib/utils";

import {
AlertDialog,
AlertDialogAction,
Expand All @@ -14,7 +16,7 @@ import {
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import { Button, buttonVariants } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import {
Select,
Expand Down Expand Up @@ -238,7 +240,7 @@ export default function EditUserRoleSheet({
<AlertDialogCancel>{t("cancel")}</AlertDialogCancel>
<AlertDialogAction
onClick={() => removeRole()}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
className={cn(buttonVariants({ variant: "destructive" }))}
>
{t("remove")}
</AlertDialogAction>
Expand Down

0 comments on commit eeb3f71

Please sign in to comment.