|
@@ -1,13 +1,13 @@
|
|
|
interface BarElementProps {
|
|
interface BarElementProps {
|
|
|
className?: string;
|
|
className?: string;
|
|
|
- property1?: "柱形元素";
|
|
|
|
|
- property2?: "1-1" | "1-2" | "2-1" | "2-4" | "2-3";
|
|
|
|
|
|
|
+ variant?: "asset-total" | "asset-net" | "profit-total" | "profit-net" | "income" | "debt-ratio";
|
|
|
|
|
+ style?: React.CSSProperties;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export default function BarElement({ className, property1 = "柱形元素", property2 = "2-1" }: BarElementProps) {
|
|
|
|
|
- if (property1 === "柱形元素" && property2 === "2-4") {
|
|
|
|
|
|
|
+export default function BarElement({ className, variant = "profit-total", style }: BarElementProps) {
|
|
|
|
|
+ if (variant === "debt-ratio") {
|
|
|
return (
|
|
return (
|
|
|
- <div className={className} data-name="Property 1=柱形元素, Property 2=2-4">
|
|
|
|
|
|
|
+ <div className={className} style={style} data-name="Property 1=柱形元素, Property 2=2-4">
|
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
|
<div className="flex-none rotate-[180deg] size-full">
|
|
<div className="flex-none rotate-[180deg] size-full">
|
|
|
<div className="box-border content-stretch flex flex-col items-start pb-[3px] pt-0 px-0 relative size-full">
|
|
<div className="box-border content-stretch flex flex-col items-start pb-[3px] pt-0 px-0 relative size-full">
|
|
@@ -42,9 +42,9 @@ export default function BarElement({ className, property1 = "柱形元素", prop
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (property1 === "柱形元素" && property2 === "1-2") {
|
|
|
|
|
|
|
+ if (variant === "asset-net") {
|
|
|
return (
|
|
return (
|
|
|
- <div className={className} data-name="Property 1=柱形元素, Property 2=1-2">
|
|
|
|
|
|
|
+ <div className={className} style={style} data-name="Property 1=柱形元素, Property 2=1-2">
|
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
|
<div className="flex-none rotate-[180deg] size-full">
|
|
<div className="flex-none rotate-[180deg] size-full">
|
|
|
<div className="bg-gradient-to-b box-border content-stretch flex flex-col from-[rgba(237,206,89,0.808)] items-start pb-[3px] pt-0 px-0 relative size-full to-[rgba(237,206,89,0)]">
|
|
<div className="bg-gradient-to-b box-border content-stretch flex flex-col from-[rgba(237,206,89,0.808)] items-start pb-[3px] pt-0 px-0 relative size-full to-[rgba(237,206,89,0)]">
|
|
@@ -65,9 +65,9 @@ export default function BarElement({ className, property1 = "柱形元素", prop
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (property1 === "柱形元素" && property2 === "1-1") {
|
|
|
|
|
|
|
+ if (variant === "asset-total") {
|
|
|
return (
|
|
return (
|
|
|
- <div className={className} data-name="Property 1=柱形元素, Property 2=1-1">
|
|
|
|
|
|
|
+ <div className={className} style={style} data-name="Property 1=柱形元素, Property 2=1-1">
|
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
|
<div className="flex-none rotate-[180deg] size-full">
|
|
<div className="flex-none rotate-[180deg] size-full">
|
|
|
<div className="bg-gradient-to-b box-border content-stretch flex flex-col from-[rgba(162,190,255,0.808)] items-start pb-[3px] pt-0 px-0 relative size-full to-[rgba(162,190,255,0)]">
|
|
<div className="bg-gradient-to-b box-border content-stretch flex flex-col from-[rgba(162,190,255,0.808)] items-start pb-[3px] pt-0 px-0 relative size-full to-[rgba(162,190,255,0)]">
|
|
@@ -88,9 +88,9 @@ export default function BarElement({ className, property1 = "柱形元素", prop
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (property1 === "柱形元素" && property2 === "2-3") {
|
|
|
|
|
|
|
+ if (variant === "profit-net") {
|
|
|
return (
|
|
return (
|
|
|
- <div className={className} data-name="Property 1=柱形元素, Property 2=2-3">
|
|
|
|
|
|
|
+ <div className={className} style={style} data-name="Property 1=柱形元素, Property 2=2-3">
|
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
|
<div className="flex-none rotate-[180deg] size-full">
|
|
<div className="flex-none rotate-[180deg] size-full">
|
|
|
<div className="bg-gradient-to-b box-border content-stretch flex flex-col from-[rgba(255,173,255,0.808)] items-start pb-[3px] pt-0 px-0 relative size-full to-[rgba(255,173,255,0)]">
|
|
<div className="bg-gradient-to-b box-border content-stretch flex flex-col from-[rgba(255,173,255,0.808)] items-start pb-[3px] pt-0 px-0 relative size-full to-[rgba(255,173,255,0)]">
|
|
@@ -111,7 +111,30 @@ export default function BarElement({ className, property1 = "柱形元素", prop
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 默认变体 (2-1)
|
|
|
|
|
|
|
+ if (variant === "income") {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <div className={className} style={style} data-name="Property 1=柱形元素, Property 2=1-1">
|
|
|
|
|
+ <div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
|
|
|
+ <div className="flex-none rotate-[180deg] size-full">
|
|
|
|
|
+ <div className="bg-gradient-to-b box-border content-stretch flex flex-col from-[rgba(162,190,255,0.808)] items-start pb-[3px] pt-0 px-0 relative size-full to-[rgba(162,190,255,0)]">
|
|
|
|
|
+ <div className="h-[4px] mb-[-3px] relative shrink-0 w-full" data-name="Vector">
|
|
|
|
|
+ <img alt="" className="block max-w-none size-full" src="/financial-dashboard/vector4.svg" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="flex items-center justify-center mb-[-3px] relative shrink-0 w-full">
|
|
|
|
|
+ <div className="flex-none rotate-[180deg] w-full">
|
|
|
|
|
+ <div className="h-[6px] relative w-full">
|
|
|
|
|
+ <img alt="" className="block max-w-none size-full" src="/financial-dashboard/frame10908.svg" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 默认变体 (profit-total)
|
|
|
return (
|
|
return (
|
|
|
<div className={className} data-name="Property 1=柱形元素, Property 2=2-1">
|
|
<div className={className} data-name="Property 1=柱形元素, Property 2=2-1">
|
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|
|
<div className="flex flex-[1_0_0] items-center justify-center mb-[-3px] min-h-px min-w-px relative shrink-0 w-full">
|