chore: icon cleanup (#13770)
Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
294 files changed
+3161
-1715
No files matched your search
@@ -10,8 +10,7 @@ import { shallow } from "zustand/shallow";
|
||||
|
||||
import type { Dayjs } from "@calcom/dayjs";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { AvailableTimesHeader } from "@calcom/features/bookings";
|
||||
import { AvailableTimes } from "@calcom/features/bookings";
|
||||
import { AvailableTimes, AvailableTimesHeader } from "@calcom/features/bookings";
|
||||
import { useBookerStore, useInitializeBookerStore } from "@calcom/features/bookings/Booker/store";
|
||||
import { useEvent, useScheduleForEvent } from "@calcom/features/bookings/Booker/utils/event";
|
||||
import { useTimePreferences } from "@calcom/features/bookings/lib/timePreferences";
|
||||
@@ -33,6 +32,7 @@ import {
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
HorizontalTabs,
|
||||
Icon,
|
||||
Label,
|
||||
Select,
|
||||
showToast,
|
||||
@@ -40,7 +40,6 @@ import {
|
||||
TextField,
|
||||
TimezoneSelect,
|
||||
} from "@calcom/ui";
|
||||
import { ArrowLeft, Sun } from "@calcom/ui/components/icon";
|
||||
|
||||
import { getDimension } from "./lib/getDimension";
|
||||
import type { EmbedTabs, EmbedType, EmbedTypes, PreviewState } from "./types";
|
||||
@@ -93,7 +92,7 @@ function useRouterHelpers() {
|
||||
const ThemeSelectControl = ({ children, ...props }: ControlProps<{ value: Theme; label: string }, false>) => {
|
||||
return (
|
||||
<components.Control {...props}>
|
||||
<Sun className="text-subtle mr-2 h-4 w-4" />
|
||||
<Icon name="sun" className="text-subtle mr-2 h-4 w-4" />
|
||||
{children}
|
||||
</components.Control>
|
||||
);
|
||||
@@ -727,7 +726,7 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
|
||||
onClick={() => {
|
||||
removeQueryParams(["embedType", "embedTabName"]);
|
||||
}}>
|
||||
<ArrowLeft className="mr-4 w-4" />
|
||||
<Icon name="arrow-left" className="mr-4 w-4" />
|
||||
</button>
|
||||
{embed.title}
|
||||
</h3>
|
||||
@@ -1154,7 +1153,7 @@ type EmbedButtonProps<T> = {
|
||||
eventId?: number;
|
||||
};
|
||||
|
||||
export const EmbedButton = <T extends React.ElementType>({
|
||||
export const EmbedButton = <T extends React.ElementType = typeof Button>({
|
||||
embedUrl,
|
||||
children,
|
||||
className = "",
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import { forwardRef } from "react";
|
||||
import type { MutableRefObject } from "react";
|
||||
import { forwardRef } from "react";
|
||||
|
||||
import type { BookerLayout } from "@calcom/features/bookings/Booker/types";
|
||||
import { APP_NAME } from "@calcom/lib/constants";
|
||||
import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { TextArea } from "@calcom/ui";
|
||||
import { Code, Trello } from "@calcom/ui/components/icon";
|
||||
|
||||
import type { EmbedType, PreviewState, EmbedFramework } from "../types";
|
||||
import type { EmbedFramework, EmbedType, PreviewState } from "../types";
|
||||
import { Codes, doWeNeedCalOriginProp } from "./EmbedCodes";
|
||||
import { EMBED_PREVIEW_HTML_URL, embedLibUrl } from "./constants";
|
||||
import { embedLibUrl, EMBED_PREVIEW_HTML_URL } from "./constants";
|
||||
import { getApiName } from "./getApiName";
|
||||
import { getDimension } from "./getDimension";
|
||||
import { useEmbedCalOrigin } from "./hooks";
|
||||
@@ -19,7 +18,7 @@ export const tabs = [
|
||||
{
|
||||
name: "HTML",
|
||||
href: "embedTabName=embed-code",
|
||||
icon: Code,
|
||||
icon: "code" as const,
|
||||
type: "code",
|
||||
Component: forwardRef<
|
||||
HTMLTextAreaElement | HTMLIFrameElement | null,
|
||||
@@ -75,7 +74,7 @@ export const tabs = [
|
||||
{
|
||||
name: "React",
|
||||
href: "embedTabName=embed-react",
|
||||
icon: Code,
|
||||
icon: "code" as const,
|
||||
type: "code",
|
||||
Component: forwardRef<
|
||||
HTMLTextAreaElement | HTMLIFrameElement | null,
|
||||
@@ -124,7 +123,7 @@ export const tabs = [
|
||||
{
|
||||
name: "Preview",
|
||||
href: "embedTabName=embed-preview",
|
||||
icon: Trello,
|
||||
icon: "trello" as const,
|
||||
type: "iframe",
|
||||
Component: forwardRef<
|
||||
HTMLIFrameElement | HTMLTextAreaElement | null,
|
||||
|
||||
Reference in new issue
Block a user