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 (
|
||||
<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>
|
||||
{breadcrumb?.length ? (
|
||||
<BreadcrumbBetterLink data={breadcrumb} />
|
||||
|
|
|
|||
20
svg/Menu.tsx
20
svg/Menu.tsx
|
|
@ -1,6 +1,16 @@
|
|||
import { SVGProps } from "react";
|
||||
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
|
||||
import { SVGProps, Ref, forwardRef, memo } from "react";
|
||||
import { cn } from "../utils";
|
||||
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
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
|
|
@ -12,4 +22,6 @@ const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
|
|||
/>
|
||||
</svg>
|
||||
);
|
||||
export { SvgComponent as Menu };
|
||||
const ForwardRef = forwardRef(SvgComponent);
|
||||
const Memo = memo(ForwardRef);
|
||||
export { Memo as Menu };
|
||||
|
|
|
|||
Loading…
Reference in New Issue