🧹 One calcom/ui import to rule them all (#5561)
* Removed emptyscreen component v1 version, migrated pages that still used it to v2, and removed v1 of workflow pages and components. * updated workflow pages imports to remove v2 from path. * Deleted v1 switch component, deleted v1 api-keys components, deleted old web integrations components that were unused. * Removed v1 list component. * Fixed event workflows tab path. * Fixed import path for button in sandbox page. * Cleanup and type fixes * Making explicit indexes * UI import migrations * More import fixes * More import fixes * Submodule sync * Type fixes * Build fixes Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
a36b46bd81
commit
ccc2bdd25e
325 files changed
+2152
-5271
No files matched your search
@@ -8,6 +8,8 @@ import { applyStyleToMultipleVariants } from "@calcom/lib/cva";
|
||||
|
||||
import Tooltip from "../../v2/core/Tooltip";
|
||||
|
||||
type InferredVariantProps = VariantProps<typeof buttonClasses>;
|
||||
|
||||
export type ButtonBaseProps = {
|
||||
/** Action that happens when the button is clicked */
|
||||
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
||||
@@ -19,7 +21,9 @@ export type ButtonBaseProps = {
|
||||
/**Tool tip used when icon size is set to small */
|
||||
tooltip?: string;
|
||||
flex?: boolean;
|
||||
} & VariantProps<typeof buttonClasses>;
|
||||
} & Omit<InferredVariantProps, "color"> & {
|
||||
color?: NonNullable<InferredVariantProps["color"]>;
|
||||
};
|
||||
|
||||
export type ButtonProps = ButtonBaseProps &
|
||||
(
|
||||
@@ -38,7 +42,8 @@ const buttonClasses = cva(
|
||||
destructive: "",
|
||||
},
|
||||
size: {
|
||||
base: "h-9 px-4 py-2.5 ",
|
||||
sm: "px-3 py-2 leading-4 rounded-sm" /** For backwards compatibility */,
|
||||
base: "h-9 px-4 py-2.5 ",
|
||||
lg: "h-[36px] px-4 py-2.5 ",
|
||||
icon: "flex justify-center min-h-[36px] min-w-[36px] ",
|
||||
},
|
||||
@@ -138,7 +143,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
) {
|
||||
const {
|
||||
loading = false,
|
||||
color,
|
||||
color = "primary",
|
||||
size,
|
||||
type = "button",
|
||||
StartIcon,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Examples, Example, Note, Title, VariantsTable, VariantColumn, RowTitles, CustomArgsTable} from '@calcom/storybook/components'
|
||||
import { Icon } from "@calcom/ui/Icon";
|
||||
import { Icon } from "@calcom/ui";
|
||||
|
||||
import { Button } from './Button';
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export * from "./Button";
|
||||
export { Button } from "./Button";
|
||||
export type { ButtonBaseProps, ButtonProps } from "./Button";
|
||||
Reference in new issue
Block a user