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:
authored and GitHub committed 2023-01-23 23:08:01 +00:00
1 parent a888be6e04
commit cfa8fd8b67
155 files changed
+881 -768

No files matched your search

@@ -12,8 +12,8 @@ import {
} from "react-select";
import { classNames } from "@calcom/lib";
import { FiCheck } from "@calcom/ui/components/icon";
import { Icon } from "../../../components/icon";
import { UpgradeTeamsBadge } from "../../badge";
export const InputComponent = <
@@ -62,7 +62,7 @@ export const OptionComponent = <
<>
<span className="mr-auto">{props.label}</span>
{(props.data as unknown as ExtendedOption).needsUpgrade && <UpgradeTeamsBadge />}
{props.isSelected && <Icon.FiCheck className="ml-2 h-4 w-4" />}
{props.isSelected && <FiCheck className="ml-2 h-4 w-4" />}
</>
</reactSelectComponents.Option>
);
@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title,CustomArgsTable, VariantRow,VariantsTable} from '@calcom/storybook/components'
import { Icon } from "@calcom/ui";
import { FiPlus } from "@calcom/ui/components/icon";
import {SelectField} from "./Select"
@@ -88,7 +88,7 @@ const BadSelect = props => (
)
// Good: Custom component declared outside of the Select scope
const Control = <IconLeading icon={Icon.FiPlus}/>
const Control = <IconLeading icon={FiPlus}/>
const GoodSelect = props => <Select {...props} components={{ Control }} />