Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(editor): add badge prop to Field component

Richie McIlroyd27b706c9593
diff --git a/apps/desktop/src/routes/editor/ui.tsx b/apps/desktop/src/routes/editor/ui.tsx
index 8601aa0d7..932de6427 100644
--- a/apps/desktop/src/routes/editor/ui.tsx
+++ b/apps/desktop/src/routes/editor/ui.tsx
@@ -27,6 +27,7 @@ export function Field(
name: string;
icon?: JSX.Element;
value?: JSX.Element;
+ badge?: string;
class?: string;
disabled?: boolean;
}>,
@@ -39,6 +40,11 @@ export function Field(
>
{props.icon}
{props.name}
+ {props.badge && (
+ <span class="text-[10px] px-1.5 py-0.5 bg-gray-3 rounded-full text-gray-11 font-medium">
+ {props.badge}
+ </span>
+ )}
{props.value && <div class="ml-auto">{props.value}</div>}
</span>
{props.children}