Reduce bundle size by importing single icons at a time (#6644)
* Removed barrel import for icons to reduce bundle size. * Fixed replacement mistakes * Reverted unneccesary yarn.lock updates * Added some missed Icon. import conversions * Remove merge artifact import in @calcom/ui * Don't import Icon in pages/[user] * Update packages/ui/package.json Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
155 files changed
+881
-768
No files matched your search
@@ -10,8 +10,8 @@ import {
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuTrigger,
|
||||
ButtonBaseProps,
|
||||
Icon,
|
||||
} from "@calcom/ui";
|
||||
import { FiChevronDown, FiMoreHorizontal } from "@calcom/ui/components/icon";
|
||||
|
||||
export type ActionType = {
|
||||
id: string;
|
||||
@@ -45,7 +45,7 @@ export const DropdownActions = ({
|
||||
<Dropdown>
|
||||
{!actionTrigger ? (
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button type="button" color="secondary" variant="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button type="button" color="secondary" variant="icon" StartIcon={FiMoreHorizontal} />
|
||||
</DropdownMenuTrigger>
|
||||
) : (
|
||||
<DropdownMenuTrigger asChild>{actionTrigger}</DropdownMenuTrigger>
|
||||
@@ -84,7 +84,7 @@ export const TableActions: FC<Props> = ({ actions }) => {
|
||||
href={action.href}
|
||||
onClick={action.onClick || defaultAction}
|
||||
StartIcon={action.icon}
|
||||
{...(action?.actions ? { EndIcon: Icon.FiChevronDown } : null)}
|
||||
{...(action?.actions ? { EndIcon: FiChevronDown } : null)}
|
||||
disabled={action.disabled}
|
||||
color={action.color || "secondary"}>
|
||||
{action.label}
|
||||
|
||||
Reference in new issue
Block a user