Skip to content

Commit 7c06ec8

Browse files
MichaelUnkeyautofix-ci[bot]perkinsjr
authored
feat: UI when a user searches for a permission it should show (#3695)
* Dialog created * small changes * half functional * small spacing changes and chevron * Rabbit Changes * remove useffect * almost * re ordered badge list collapse * undo rabbit * [autofix.ci] apply automated fixes * fix scroll * changes before merge * functioning again * style change * more tweaks * Fix all the fucking things * remove close button * fmt --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: James Perkins <[email protected]>
1 parent 283569f commit 7c06ec8

File tree

9 files changed

+616
-174
lines changed

9 files changed

+616
-174
lines changed

apps/dashboard/app/(app)/settings/root-keys/components/create-root-key/components/expandable-category.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,22 @@ type ExpandableCategoryProps = {
1111
description: string;
1212
checked: CheckedState | undefined;
1313
setChecked: () => void;
14+
count: number;
1415
} & React.ComponentProps<typeof CollapsibleTrigger>;
1516

1617
export const ExpandableCategory = ({
1718
category,
1819
description,
1920
checked,
2021
setChecked,
22+
count,
2123
...props
2224
}: ExpandableCategoryProps) => {
25+
if (count === 0) {
26+
return null;
27+
}
2328
return (
24-
<div className="flex flex-row items-center justify-evenly gap-3 transition-all pl-6 pr-2 h-full my-2">
29+
<div className="flex flex-row items-center justify-evenly gap-3 transition-all pl-3 pr-2 h-full my-2">
2530
<div className="flex items-center justify-center">
2631
<Checkbox checked={checked} onCheckedChange={() => setChecked()} size="lg" />
2732
</div>

0 commit comments

Comments
 (0)