tailwind prettier (#1646)

* tailwind prettier

* Minor fixes

* Sorts components and pages

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-02-09 00:05:13 +00:00
1 parent 1e9234ea67
commit 51d553559f
125 files changed
+977 -945

No files matched your search

+16 -16
View File
@@ -24,40 +24,40 @@ export default function LicenseBanner() {
}
return (
<div className="fixed inset-x-0 bottom-0 left-0 pb-2 md:left-56 sm:pb-5">
<div className="px-2 mx-auto max-w-7xl sm:px-8">
<div className="p-2 bg-green-600 rounded-sm shadow-lg sm:p-3">
<div className="fixed inset-x-0 bottom-0 left-0 pb-2 sm:pb-5 md:left-56">
<div className="mx-auto max-w-7xl px-2 sm:px-8">
<div className="rounded-sm bg-green-600 p-2 shadow-lg sm:p-3">
<div className="flex flex-wrap items-center justify-between">
<div className="flex items-center flex-1 w-0">
<span className="flex p-2 bg-green-800 rounded-sm">
<BadgeCheckIcon className="w-6 h-6 text-white" aria-hidden="true" />
<div className="flex w-0 flex-1 items-center">
<span className="flex rounded-sm bg-green-800 p-2">
<BadgeCheckIcon className="h-6 w-6 text-white" aria-hidden="true" />
</span>
<p className="ml-3 font-medium text-white truncate">
<p className="ml-3 truncate font-medium text-white">
<span className="inline">
<Trans i18nKey="accept_our_license" values={{ agree: "agree" }}>
Accept our license by changing the .env variable
<span className="px-1 bg-gray-50 bg-opacity-20">NEXT_PUBLIC_LICENSE_CONSENT</span> to
<span className="bg-gray-50 bg-opacity-20 px-1">NEXT_PUBLIC_LICENSE_CONSENT</span> to
&apos;agree&apos;.
</Trans>
</span>
</p>
</div>
<div className="flex-shrink-0 order-3 w-full mt-2 sm:order-2 sm:mt-0 sm:w-auto">
<div className="order-3 mt-2 w-full flex-shrink-0 sm:order-2 sm:mt-0 sm:w-auto">
<Dialog>
<DialogTrigger asChild>
<button className="flex items-center justify-center w-full px-4 py-2 text-sm font-medium text-green-600 bg-white border border-transparent rounded-sm shadow-sm hover:bg-green-50">
<button className="flex w-full items-center justify-center rounded-sm border border-transparent bg-white px-4 py-2 text-sm font-medium text-green-600 shadow-sm hover:bg-green-50">
{t("accept_license")}
</button>
</DialogTrigger>
<DialogContent />
</Dialog>
</div>
<div className="flex-shrink-0 order-2 sm:order-3 sm:ml-2">
<div className="order-2 flex-shrink-0 sm:order-3 sm:ml-2">
<Dialog>
<DialogTrigger asChild>
<button className="flex p-2 -mr-1 rounded-sm hover:bg-green-500 focus:outline-none focus:ring-2 focus:ring-white">
<button className="-mr-1 flex rounded-sm p-2 hover:bg-green-500 focus:outline-none focus:ring-2 focus:ring-white">
<span className="sr-only">{t("dismiss")}</span>
<XIcon className="w-6 h-6 text-white" aria-hidden="true" />
<XIcon className="h-6 w-6 text-white" aria-hidden="true" />
</button>
</DialogTrigger>
<DialogContent />
@@ -78,12 +78,12 @@ export default function LicenseBanner() {
cancelBtnText={t("cancel")}>
<Trans i18nKey="remove_banner_instructions" values={{ agree: "agree" }}>
To remove this banner, please open your .env file and change the
<span className="bg-green-400 text-green-500 bg-opacity-20 p-[2px]">
<span className="bg-green-400 bg-opacity-20 p-[2px] text-green-500">
NEXT_PUBLIC_LICENSE_CONSENT
</span>{" "}
</span>
variable to &apos;agreeapos;.
</Trans>
<h2 className="mt-8 mb-2 text-black font-cal">{t("terms_summary")}:</h2>
<h2 className="mt-8 mb-2 font-cal text-black">{t("terms_summary")}:</h2>
<ul className="ml-5 list-disc">
<li>{t("codebase_has_to_stay_opensource")}</li>
<li>{t("cannot_repackage_codebase")}</li>
+2 -2
View File
@@ -19,13 +19,13 @@ const TrialBanner = () => {
return (
<div
className="hidden p-4 m-4 text-sm font-medium text-center text-gray-600 bg-yellow-200 rounded-md sm:block"
className="m-4 hidden rounded-md bg-yellow-200 p-4 text-center text-sm font-medium text-gray-600 sm:block"
data-testid="trial-banner">
<div className="mb-2 text-left">{t("trial_days_left", { days: trialDaysLeft })}</div>
<Button
href="/api/upgrade"
color="minimal"
className="justify-center w-full border-2 border-gray-600 hover:bg-yellow-100">
className="w-full justify-center border-2 border-gray-600 hover:bg-yellow-100">
{t("upgrade_now")}
</Button>
</div>
+2 -2
View File
@@ -94,7 +94,7 @@ export default function SAMLConfiguration({
<>
<hr className="mt-8" />
<div className="mt-6">
<h2 className="text-lg font-medium leading-6 text-gray-900 font-cal">
<h2 className="font-cal text-lg font-medium leading-6 text-gray-900">
{t("saml_configuration")}
<Badge className="ml-2 text-xs" variant={samlConfig ? "success" : "gray"}>
{samlConfig ? t("enabled") : t("disabled")}
@@ -110,7 +110,7 @@ export default function SAMLConfiguration({
</div>
{samlConfig ? (
<div className="flex mt-2">
<div className="mt-2 flex">
<Dialog>
<DialogTrigger asChild>
<Button
+1 -1
View File
@@ -106,7 +106,7 @@ export default function PaymentComponent(props: Props) {
return (
<form id="payment-form" className="mt-4" onSubmit={handleSubmit}>
<CardElement id="card-element" options={CARD_OPTIONS} onChange={handleChange} />
<div className="flex justify-center mt-2">
<div className="mt-2 flex justify-center">
<Button
type="submit"
disabled={["processing", "error"].includes(state.status)}
+9 -9
View File
@@ -40,25 +40,25 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main className="max-w-3xl py-24 mx-auto">
<main className="mx-auto max-w-3xl py-24">
<div className="fixed inset-0 z-50 overflow-y-auto">
<div className="flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
<div className="flex min-h-screen items-end justify-center px-4 pt-4 pb-20 text-center sm:block sm:p-0">
<div className="fixed inset-0 my-4 transition-opacity sm:my-0" aria-hidden="true">
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
<span className="hidden sm:inline-block sm:h-screen sm:align-middle" aria-hidden="true">
&#8203;
</span>
<div
className="inline-block px-8 pt-5 pb-4 overflow-hidden text-left align-bottom transition-all transform bg-white border rounded-sm dark:bg-gray-800 border-neutral-200 dark:border-neutral-700 sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:py-6"
className="inline-block transform overflow-hidden rounded-sm border border-neutral-200 bg-white px-8 pt-5 pb-4 text-left align-bottom transition-all dark:border-neutral-700 dark:bg-gray-800 sm:my-8 sm:w-full sm:max-w-lg sm:py-6 sm:align-middle"
role="dialog"
aria-modal="true"
aria-labelledby="modal-headline">
<div>
<div className="flex items-center justify-center w-12 h-12 mx-auto bg-green-100 rounded-full">
<CreditCardIcon className="w-8 h-8 text-green-600" />
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100">
<CreditCardIcon className="h-8 w-8 text-green-600" />
</div>
<div className="mt-3 text-center sm:mt-5">
<h3
className="text-2xl font-semibold leading-6 dark:text-white text-neutral-900"
className="text-2xl font-semibold leading-6 text-neutral-900 dark:text-white"
id="modal-headline">
{t("payment")}
</h3>
@@ -67,7 +67,7 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
{t("pay_later_instructions")}
</p>
</div>
<div className="grid grid-cols-3 py-4 mt-4 text-left text-gray-700 border-t border-b dark:text-gray-300 dark:border-gray-900">
<div className="mt-4 grid grid-cols-3 border-t border-b py-4 text-left text-gray-700 dark:border-gray-900 dark:text-gray-300">
<div className="font-medium">{t("what")}</div>
<div className="col-span-2 mb-6">{eventName}</div>
<div className="font-medium">{t("when")}</div>
@@ -117,7 +117,7 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
)}
</div>
{!props.profile.hideBranding && (
<div className="pt-4 mt-4 text-xs text-center text-gray-400 border-t dark:border-gray-900 dark:text-white">
<div className="mt-4 border-t pt-4 text-center text-xs text-gray-400 dark:border-gray-900 dark:text-white">
<a href="https://cal.com/signup">{t("create_booking_link_with_calcom")}</a>
</div>
)}
@@ -32,17 +32,17 @@ export default function TeamAvailabilityModal(props: Props) {
}, [utils, selectedTimeZone, selectedDate]);
return (
<div className="flex flex-row max-h-[500px] min-h-[500px] rtl:space-x-reverse space-x-8">
<div className="w-64 p-5 pr-0 space-y-5 min-w-64">
<div className="flex max-h-[500px] min-h-[500px] flex-row space-x-8 rtl:space-x-reverse">
<div className="w-64 min-w-64 space-y-5 p-5 pr-0">
<div className="flex">
<Avatar
imageSrc={getPlaceholderAvatar(props.member?.avatar, props.member?.name as string)}
alt={props.member?.name || ""}
className="rounded-full w-14 h-14"
className="h-14 w-14 rounded-full"
/>
<div className="inline-block pt-1 ml-3">
<div className="ml-3 inline-block pt-1">
<span className="text-lg font-bold text-neutral-700">{props.member?.name}</span>
<span className="block -mt-1 text-sm text-gray-400">{props.member?.email}</span>
<span className="-mt-1 block text-sm text-gray-400">{props.member?.email}</span>
</div>
</div>
<div className="flex flex-col">
@@ -61,7 +61,7 @@ export default function TeamAvailabilityModal(props: Props) {
value={selectedTimeZone}
onChange={(timezone) => setSelectedTimeZone(timezone.value)}
classNamePrefix="react-select"
className="block w-full mt-1 border border-gray-300 rounded-sm shadow-sm react-select-container focus:ring-neutral-800 focus:border-neutral-800 sm:text-sm"
className="react-select-container mt-1 block w-full rounded-sm border border-gray-300 shadow-sm focus:border-neutral-800 focus:ring-neutral-800 sm:text-sm"
/>
</div>
<div>
@@ -74,7 +74,7 @@ export default function TeamAvailabilityModal(props: Props) {
]}
isSearchable={false}
classNamePrefix="react-select"
className="flex-1 block w-full min-w-0 border border-gray-300 rounded-sm react-select-container focus:ring-primary-500 focus:border-primary-500 sm:text-sm"
className="react-select-container block w-full min-w-0 flex-1 rounded-sm border border-gray-300 focus:border-primary-500 focus:ring-primary-500 sm:text-sm"
value={{ value: frequency, label: `${frequency} minutes` }}
onChange={(newFrequency) => setFrequency(newFrequency?.value ?? 30)}
/>
@@ -35,7 +35,7 @@ export default function TeamAvailabilityScreen(props: Props) {
if (!member) return <></>;
return (
<div key={member.id} style={style} className="flex pl-4 border-r border-gray-200 ">
<div key={member.id} style={style} className="flex border-r border-gray-200 pl-4 ">
<TeamAvailabilityTimes
teamId={props.team?.id as number}
memberId={member.id}
@@ -43,15 +43,15 @@ export default function TeamAvailabilityScreen(props: Props) {
selectedDate={selectedDate}
selectedTimeZone={selectedTimeZone}
HeaderComponent={
<div className="flex items-center mb-6">
<div className="mb-6 flex items-center">
<Avatar
imageSrc={getPlaceholderAvatar(member?.avatar, member?.name as string)}
alt={member?.name || ""}
className="w-10 h-10 mt-1 rounded-full min-w-10 min-h-10"
className="mt-1 h-10 min-h-10 w-10 min-w-10 rounded-full"
/>
<div className="inline-block pt-1 ml-3 overflow-hidden">
<span className="text-lg font-bold truncate text-neutral-700">{member?.name}</span>
<span className="block -mt-1 text-sm text-gray-400 truncate">{member?.email}</span>
<div className="ml-3 inline-block overflow-hidden pt-1">
<span className="truncate text-lg font-bold text-neutral-700">{member?.name}</span>
<span className="-mt-1 block truncate text-sm text-gray-400">{member?.email}</span>
</div>
</div>
}
@@ -61,8 +61,8 @@ export default function TeamAvailabilityScreen(props: Props) {
};
return (
<div className="flex flex-col flex-1 bg-white border rounded-sm border-neutral-200">
<div className="flex w-full p-4 rtl:space-x-reverse space-x-5 border-b border-gray-200">
<div className="flex flex-1 flex-col rounded-sm border border-neutral-200 bg-white">
<div className="flex w-full space-x-5 border-b border-gray-200 p-4 rtl:space-x-reverse">
<div className="flex flex-col">
<span className="text-sm font-medium text-neutral-700">Date</span>
<DatePicker
@@ -80,7 +80,7 @@ export default function TeamAvailabilityScreen(props: Props) {
value={selectedTimeZone}
onChange={(timezone) => setSelectedTimeZone(timezone.value)}
classNamePrefix="react-select"
className="w-full border border-gray-300 rounded-sm shadow-sm react-select-container focus:ring-neutral-800 focus:border-neutral-800 sm:text-sm"
className="react-select-container w-full rounded-sm border border-gray-300 shadow-sm focus:border-neutral-800 focus:ring-neutral-800 sm:text-sm"
/>
</div>
<div className="hidden sm:block">
@@ -93,13 +93,13 @@ export default function TeamAvailabilityScreen(props: Props) {
]}
isSearchable={false}
classNamePrefix="react-select"
className="flex-1 block w-full min-w-0 border border-gray-300 rounded-sm react-select-container focus:ring-primary-500 focus:border-primary-500 sm:text-sm"
className="react-select-container block w-full min-w-0 flex-1 rounded-sm border border-gray-300 focus:border-primary-500 focus:ring-primary-500 sm:text-sm"
value={{ value: frequency, label: `${frequency} minutes` }}
onChange={(newFrequency) => setFrequency(newFrequency?.value ?? 30)}
/>
</div>
</div>
<div className="flex flex-1 h-full">
<div className="flex h-full flex-1">
<AutoSizer>
{({ height, width }) => (
<List
@@ -48,7 +48,7 @@ export default function TeamAvailabilityTimes(props: Props) {
: [];
return (
<div className={classNames("flex-grow p-5 pl-0 min-w-60", props.className)}>
<div className={classNames("min-w-60 flex-grow p-5 pl-0", props.className)}>
{props.HeaderComponent}
{isLoading && times.length === 0 && <Loader />}
{!isLoading && times.length === 0 && (
@@ -59,7 +59,7 @@ export default function TeamAvailabilityTimes(props: Props) {
{times.map((time) => (
<div key={time.format()} className="flex flex-row items-center">
<a
className="flex-grow block py-2 mb-2 mr-3 font-medium text-center bg-white border rounded-sm min-w-48 dark:bg-gray-600 text-primary-500 dark:text-neutral-200 border-brand dark:border-transparent hover:bg-brand hover:text-brandcontrast dark:hover:border-black dark:hover:text-white dark:hover:bg-black"
className="mb-2 mr-3 block min-w-48 flex-grow rounded-sm border border-brand bg-white py-2 text-center font-medium text-primary-500 hover:bg-brand hover:text-brandcontrast dark:border-transparent dark:bg-gray-600 dark:text-neutral-200 dark:hover:border-black dark:hover:bg-black dark:hover:text-white"
data-testid="time">
{time.format("HH:mm")}
</a>
+4 -4
View File
@@ -96,7 +96,7 @@ const CryptoSection = (props: CryptoSectionProps) => {
const verifyButton = useMemo(() => {
return (
<Button color="secondary" onClick={verifyWallet} type="button" id="hasToken" name="hasToken">
<img className="h-5 mr-1" src="/integrations/metamask.svg" />
<img className="mr-1 h-5" src="/integrations/metamask.svg" />
{t("verify_wallet")}
</Button>
);
@@ -105,7 +105,7 @@ const CryptoSection = (props: CryptoSectionProps) => {
const connectButton = useMemo(() => {
return (
<Button color="secondary" onClick={connectMetamask} type="button">
<img className="h-5 mr-1" src="/integrations/metamask.svg" />
<img className="mr-1 h-5" src="/integrations/metamask.svg" />
{t("connect_metamask")}
</Button>
);
@@ -120,7 +120,7 @@ const CryptoSection = (props: CryptoSectionProps) => {
await connectMetamask();
await verifyWallet();
}}>
<img className="h-5 mr-1" src="/integrations/metamask.svg" />
<img className="mr-1 h-5" src="/integrations/metamask.svg" />
{t("verify_wallet")}
</Button>
);
@@ -141,7 +141,7 @@ const CryptoSection = (props: CryptoSectionProps) => {
return (
<div
className="absolute transition-opacity transform -translate-x-1/2 -translate-y-1/2 opacity-0 dark:bg-gray-900 top-1/2 left-1/2 group-hover:opacity-100"
className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transform opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-900"
id={`crypto-${props.id}`}>
{determineButton()}
</div>
+1 -1
View File
@@ -20,7 +20,7 @@ const HelpMenuItem = () => {
<ChatAltIcon
className={classNames(
"text-neutral-400 group-hover:text-neutral-500",
"ltr:mr-2 flex-shrink-0 h-5 w-5"
"h-5 w-5 flex-shrink-0 ltr:mr-2"
)}
aria-hidden="true"
/>