chore: icon cleanup (#13770)

Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-04-03 23:23:57 +00:00
1 parent 7421cea0da
commit 3f02de8214
294 files changed
+3161 -1715

No files matched your search

@@ -1,21 +1,21 @@
import type { Column } from "@tanstack/react-table";
import type { LucideIcon } from "lucide-react";
import { Check, Filter } from "lucide-react";
import { classNames } from "@calcom/lib";
import { Icon } from "../..";
import { Badge } from "../badge";
import { Button } from "../button";
import {
Command,
CommandInput,
CommandList,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
} from "../command";
import { Popover, PopoverTrigger, PopoverContent } from "../popover";
import { Popover, PopoverContent, PopoverTrigger } from "../popover";
interface DataTableFilter<TData, TValue> {
column?: Column<TData, TValue>;
@@ -34,7 +34,7 @@ export function DataTableFilter<TData, TValue>({ column, title, options }: DataT
<Popover>
<PopoverTrigger asChild>
<Button color="secondary" size="sm" className="border-subtle h-8 rounded-md">
<Filter className="mr-2 h-4 w-4" />
<Icon name="filter" className="mr-2 h-4 w-4" />
{title}
{selectedValues?.size > 0 && (
<>
@@ -83,7 +83,7 @@ export function DataTableFilter<TData, TValue>({ column, title, options }: DataT
"border-subtle mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
isSelected ? "text-emphasis" : "opacity-50 [&_svg]:invisible"
)}>
<Check className={classNames("h-4 w-4")} />
<Icon name="check" className={classNames("h-4 w-4")} />
</div>
{option.icon && <option.icon className="text-muted mr-2 h-4 w-4" />}
<span>{option.label}</span>
@@ -1,5 +1,4 @@
import type { Table } from "@tanstack/react-table";
import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from "lucide-react";
import { Button } from "../button";
@@ -22,7 +21,7 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
<Button
color="secondary"
variant="icon"
StartIcon={ChevronsLeft}
StartIcon="chevrons-left"
className="hidden h-8 w-8 p-0 lg:flex"
onClick={() => table.setPageIndex(0)}>
<span className="sr-only">Go to first page</span>
@@ -33,13 +32,13 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
className="h-8 w-8 p-0"
onClick={() => table.previousPage()}
disabled={!table.getCanPreviousPage()}
StartIcon={ChevronLeft}>
StartIcon="chevron-left">
<span className="sr-only">Go to previous page</span>
</Button>
<Button
color="secondary"
variant="icon"
StartIcon={ChevronRight}
StartIcon="chevron-right"
className="h-8 w-8 p-0"
disabled={!table.getCanNextPage()}
onClick={() => table.nextPage()}>
@@ -49,7 +48,7 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
color="secondary"
variant="icon"
className="hidden h-8 w-8 p-0 lg:flex"
StartIcon={ChevronsRight}
StartIcon="chevrons-right"
onClick={() => table.setPageIndex(table.getPageCount())}>
<span className="sr-only">Go to last page</span>
</Button>
@@ -1,9 +1,8 @@
import type { Table } from "@tanstack/react-table";
import { motion, AnimatePresence } from "framer-motion";
import { AnimatePresence, motion } from "framer-motion";
import { Fragment } from "react";
import type { SVGComponent } from "@calcom/types/SVGComponent";
import type { IconName } from "../..";
import { Button } from "../button";
export type ActionItem<TData> =
@@ -11,7 +10,7 @@ export type ActionItem<TData> =
type: "action";
label: string;
onClick: () => void;
icon?: SVGComponent;
icon?: IconName;
}
| {
type: "render";
@@ -2,7 +2,6 @@
import type { Table } from "@tanstack/react-table";
import type { LucideIcon } from "lucide-react";
import { X } from "lucide-react";
import { useEffect, useState } from "react";
import { useDebounce } from "@calcom/lib/hooks/useDebounce";
@@ -72,7 +71,7 @@ export function DataTableToolbar<TData>({
{isFiltered && (
<Button
color="minimal"
EndIcon={X}
EndIcon="x"
onClick={() => table.resetColumnFilters()}
className="h-8 px-2 lg:px-3">
{t("clear")}
@@ -1,5 +1,3 @@
import { StopCircle, Users } from "lucide-react";
export type DataTableUserStorybook = {
id: string;
username: string;
@@ -13,14 +11,14 @@ export const dataTableSelectionActions = [
onClick: () => {
console.log("Add To Team");
},
icon: Users,
icon: "users",
},
{
label: "Delete",
onClick: () => {
console.log("Delete");
},
icon: StopCircle,
icon: "stop-circle",
},
];