fix: padding in shell for mobile (#6825)
* fix: padding * fix: breakpoints in fab * fix: padding
This commit is contained in:
1 parent
6cf53feaf8
commit
1f1cab2be1
3 files changed
+15
-15
No files matched your search
@@ -185,7 +185,7 @@ export default function Availability({ schedule }: { schedule: number }) {
|
||||
...values,
|
||||
});
|
||||
}}
|
||||
className="flex flex-col pb-16 sm:mx-0 xl:flex-row xl:space-x-6">
|
||||
className="flex flex-col pb-16 pt-4 sm:mx-0 md:pt-0 xl:flex-row xl:space-x-6">
|
||||
<div className="flex-1 divide-y divide-gray-200 rounded-md border">
|
||||
<div className=" py-5 sm:p-6">
|
||||
{typeof me.data?.weekStart === "string" && (
|
||||
|
||||
@@ -780,10 +780,10 @@ function SideBar() {
|
||||
export function ShellMain(props: LayoutProps) {
|
||||
const router = useRouter();
|
||||
const { isLocaleReady } = useLocale();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={classNames("mb-6 flex items-center sm:mt-0", props.smallHeading ? "lg:mb-7" : "lg:mb-8")}>
|
||||
<div className={classNames("flex items-center", props.smallHeading ? "md:mb-7" : "md:mb-8")}>
|
||||
{!!props.backPath && (
|
||||
<Button
|
||||
variant="icon"
|
||||
@@ -800,18 +800,18 @@ export function ShellMain(props: LayoutProps) {
|
||||
{props.heading && (
|
||||
<header className={classNames(props.large && "py-8", "flex w-full max-w-full items-center")}>
|
||||
{props.HeadingLeftIcon && <div className="ltr:mr-4">{props.HeadingLeftIcon}</div>}
|
||||
<div className={classNames("w-full ltr:mr-4 rtl:ml-4 sm:block", props.headerClassName)}>
|
||||
<div className={classNames("w-full ltr:mr-4 rtl:ml-4 md:block", props.headerClassName)}>
|
||||
{props.heading && (
|
||||
<h1
|
||||
className={classNames(
|
||||
"font-cal max-w-28 sm:max-w-72 md:max-w-80 mt-1 hidden truncate text-xl font-semibold tracking-wide text-black sm:block xl:max-w-full",
|
||||
"font-cal max-w-28 sm:max-w-72 md:max-w-80 mt-1 hidden truncate text-xl font-semibold tracking-wide text-black md:block xl:max-w-full",
|
||||
props.smallHeading ? "text-base" : "text-xl"
|
||||
)}>
|
||||
{!isLocaleReady ? <SkeletonText invisible /> : props.heading}
|
||||
</h1>
|
||||
)}
|
||||
{props.subtitle && (
|
||||
<p className="hidden text-sm text-gray-500 sm:block">
|
||||
<p className="hidden text-sm text-gray-500 md:block">
|
||||
{!isLocaleReady ? <SkeletonText invisible /> : props.subtitle}
|
||||
</p>
|
||||
)}
|
||||
@@ -821,8 +821,8 @@ export function ShellMain(props: LayoutProps) {
|
||||
className={classNames(
|
||||
props.backPath
|
||||
? "relative"
|
||||
: "fixed bottom-[88px] z-40 ltr:right-4 rtl:left-4 sm:z-auto md:ltr:right-0 md:rtl:left-0",
|
||||
"flex-shrink-0 sm:relative sm:bottom-auto sm:right-auto"
|
||||
: "fixed bottom-[88px] z-40 ltr:right-4 rtl:left-4 md:z-auto md:ltr:right-0 md:rtl:left-0",
|
||||
"flex-shrink-0 md:relative md:bottom-auto md:right-auto"
|
||||
)}>
|
||||
{props.CTA}
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@ const buttonClasses = cva(
|
||||
variant: {
|
||||
button: "",
|
||||
icon: "flex justify-center",
|
||||
fab: "rounded-full justify-center sm:rounded-md radix-state-open:rotate-45 sm:radix-state-open:rotate-0 transition-transform radix-state-open:shadown-none radix-state-open:ring-0 !shadow-none",
|
||||
fab: "rounded-full justify-center md:rounded-md radix-state-open:rotate-45 md:radix-state-open:rotate-0 transition-transform radix-state-open:shadown-none radix-state-open:ring-0 !shadow-none",
|
||||
},
|
||||
color: {
|
||||
primary: "text-white dark:text-black",
|
||||
@@ -149,7 +149,7 @@ const buttonClasses = cva(
|
||||
{
|
||||
variant: "fab",
|
||||
size: "base",
|
||||
className: "h-14 sm:h-9 sm:w-auto sm:px-4 sm:py-2.5",
|
||||
className: "h-14 md:h-9 md:w-auto md:px-4 md:py-2.5",
|
||||
},
|
||||
],
|
||||
defaultVariants: {
|
||||
@@ -204,8 +204,8 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
<>
|
||||
{variant === "fab" ? (
|
||||
<>
|
||||
<StartIcon className="hidden h-4 w-4 stroke-[1.5px] ltr:mr-2 rtl:ml-2 sm:inline-flex" />
|
||||
<FiPlus className="inline h-6 w-6 sm:hidden" />
|
||||
<StartIcon className="hidden h-4 w-4 stroke-[1.5px] ltr:mr-2 rtl:ml-2 md:inline-flex" />
|
||||
<FiPlus className="inline h-6 w-6 md:hidden" />
|
||||
</>
|
||||
) : (
|
||||
<StartIcon
|
||||
@@ -217,7 +217,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{variant === "fab" ? <span className="hidden sm:inline">{props.children}</span> : props.children}
|
||||
{variant === "fab" ? <span className="hidden md:inline">{props.children}</span> : props.children}
|
||||
{loading && (
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transform">
|
||||
<svg
|
||||
@@ -238,8 +238,8 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
<>
|
||||
{variant === "fab" ? (
|
||||
<>
|
||||
<EndIcon className="-mr-1 hidden h-5 w-5 ltr:ml-2 rtl:-ml-1 rtl:mr-2 sm:inline" />
|
||||
<FiPlus className="inline h-6 w-6 sm:hidden" />
|
||||
<EndIcon className="-mr-1 hidden h-5 w-5 ltr:ml-2 rtl:-ml-1 rtl:mr-2 md:inline" />
|
||||
<FiPlus className="inline h-6 w-6 md:hidden" />
|
||||
</>
|
||||
) : (
|
||||
<EndIcon
|
||||
|
||||
Reference in new issue
Block a user