Skip to content

Commit

Permalink
Refactor table-row-actions components
Browse files Browse the repository at this point in the history
  • Loading branch information
MuttakinHasib committed Feb 9, 2024
1 parent 1d195c8 commit b288ca1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
10 changes: 2 additions & 8 deletions apps/admin/src/components/attribute/table-row-actions.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { DotsHorizontalIcon } from "@radix-ui/react-icons";
import { Row } from "@tanstack/react-table";

import {
Button,
DropdownMenu,
Expand All @@ -12,13 +12,7 @@ import {
DropdownMenuTrigger,
} from "..";

interface DataTableRowActionsProps<TData> {
row: Row<TData>;
}

export function ProductTableRowActions<
TData
>({}: DataTableRowActionsProps<TData>) {
export function ProductTableRowActions() {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand Down
10 changes: 2 additions & 8 deletions apps/admin/src/components/category/table-row-actions.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { DotsHorizontalIcon } from "@radix-ui/react-icons";
import { Row } from "@tanstack/react-table";

import {
Button,
DropdownMenu,
Expand All @@ -12,13 +12,7 @@ import {
DropdownMenuTrigger,
} from "..";

interface DataTableRowActionsProps<TData> {
row: Row<TData>;
}

export function CategoryTableRowActions<
TData
>({}: DataTableRowActionsProps<TData>) {
export function CategoryTableRowActions() {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand Down
12 changes: 3 additions & 9 deletions apps/admin/src/components/product/table-row-actions.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
"use client";

import { DotsHorizontalIcon } from "@radix-ui/react-icons";
import { Row } from "@tanstack/react-table";

import {
Button,
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuShortcut,
DropdownMenuTrigger,
} from "..";

interface DataTableRowActionsProps<TData> {
row: Row<TData>;
}

export function ProductTableRowActions<
TData
>({}: DataTableRowActionsProps<TData>) {
export function ProductTableRowActions() {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand Down

0 comments on commit b288ca1

Please sign in to comment.