fix: update TableUI padding for better layout and enhance Menu SVG component with forwardRef and memo for performance
This commit is contained in:
parent
60ff6de9a8
commit
e0271ca527
|
|
@ -57,7 +57,7 @@ export const TableUI = <T extends object>({
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col flex-grow">
|
<div className="flex flex-col flex-grow">
|
||||||
<div className="w-full p-4 py-6 pr-6 pl-3 ">
|
<div className="w-full p-4 md:py-6 pr-6 pl-3 ">
|
||||||
<div className="flex flex-row text-2xl font-bold">{title}</div>
|
<div className="flex flex-row text-2xl font-bold">{title}</div>
|
||||||
{breadcrumb?.length ? (
|
{breadcrumb?.length ? (
|
||||||
<BreadcrumbBetterLink data={breadcrumb} />
|
<BreadcrumbBetterLink data={breadcrumb} />
|
||||||
|
|
|
||||||
20
svg/Menu.tsx
20
svg/Menu.tsx
|
|
@ -1,6 +1,16 @@
|
||||||
import { SVGProps } from "react";
|
import { SVGProps, Ref, forwardRef, memo } from "react";
|
||||||
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
|
import { cn } from "../utils";
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
|
const SvgComponent = (
|
||||||
|
props: SVGProps<SVGSVGElement>,
|
||||||
|
ref: Ref<SVGSVGElement>
|
||||||
|
) => (
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
ref={ref}
|
||||||
|
className={cn(`text-current`, props.className)}
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
|
|
@ -12,4 +22,6 @@ const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
export { SvgComponent as Menu };
|
const ForwardRef = forwardRef(SvgComponent);
|
||||||
|
const Memo = memo(ForwardRef);
|
||||||
|
export { Memo as Menu };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue