mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 18:41:21 +00:00
truncation and UI tweaks
This commit is contained in:
+9
-3
@@ -12,9 +12,15 @@ export const OCIVaultSyncReviewFields = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<GenericFieldLabel label="Compartment OCID">{compartmentOcid}</GenericFieldLabel>
|
||||
<GenericFieldLabel label="Vault OCID">{vaultOcid}</GenericFieldLabel>
|
||||
<GenericFieldLabel label="Key OCID">{keyOcid}</GenericFieldLabel>
|
||||
<GenericFieldLabel label="Compartment OCID" truncate>
|
||||
{compartmentOcid}
|
||||
</GenericFieldLabel>
|
||||
<GenericFieldLabel label="Vault OCID" truncate>
|
||||
{vaultOcid}
|
||||
</GenericFieldLabel>
|
||||
<GenericFieldLabel label="Key OCID" truncate>
|
||||
{keyOcid}
|
||||
</GenericFieldLabel>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -6,14 +6,21 @@ type Props = {
|
||||
children?: ReactNode;
|
||||
className?: string;
|
||||
labelClassName?: string;
|
||||
truncate?: boolean;
|
||||
};
|
||||
|
||||
export const GenericFieldLabel = ({ label, children, className, labelClassName }: Props) => {
|
||||
export const GenericFieldLabel = ({
|
||||
label,
|
||||
children,
|
||||
className,
|
||||
labelClassName,
|
||||
truncate
|
||||
}: Props) => {
|
||||
return (
|
||||
<div className={className}>
|
||||
<div className={twMerge("min-w-0", className)}>
|
||||
<p className={twMerge("text-xs font-medium text-mineshaft-400", labelClassName)}>{label}</p>
|
||||
{children ? (
|
||||
<p className="text-sm text-mineshaft-100">{children}</p>
|
||||
<p className={twMerge("text-sm text-mineshaft-100", truncate && "truncate")}>{children}</p>
|
||||
) : (
|
||||
<p className="text-sm italic text-mineshaft-400/50">None</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user