fix: Do not self import @calcom/ui (#20050)
* fix: Do not self import @calcom/ui * Make translations optional * Fix mocking implementation of Button (never worked) * Ensure other libraries can resolve AppListCard
This commit is contained in:
1 parent
b1ebefb854
commit
be404436d7
28 files changed
+201
-124
No files matched your search
@@ -1,21 +1,28 @@
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Label, Input } from "@calcom/ui";
|
||||
// TODO: This file is currently unused.
|
||||
import { Label } from "../form/inputs/Label";
|
||||
import { Input } from "../form/inputs/TextField";
|
||||
|
||||
type Digit = {
|
||||
value: number;
|
||||
onChange: () => void;
|
||||
};
|
||||
|
||||
type Translations = {
|
||||
labelText?: string;
|
||||
};
|
||||
|
||||
type PropType = {
|
||||
digits: Digit[];
|
||||
digitClassName: string;
|
||||
translations?: Translations;
|
||||
};
|
||||
|
||||
const TokenHandler = ({ digits, digitClassName }: PropType) => {
|
||||
const { t } = useLocale();
|
||||
const TokenHandler = ({ digits, digitClassName, translations }: PropType) => {
|
||||
const { labelText = "Code" } = translations ?? {};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Label htmlFor="code">{t("code")}</Label>
|
||||
<Label htmlFor="code">{labelText}</Label>
|
||||
<div className="flex flex-row justify-between">
|
||||
{digits.map((element, index) => (
|
||||
<Input
|
||||
|
||||
Reference in new issue
Block a user