We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8aeaec9 commit f25badaCopy full SHA for f25bada
src/components/Tags/Tags.tsx
@@ -1,8 +1,9 @@
1
-import {FunctionComponent, PropsWithChildren} from "react";
+import {Children, FunctionComponent, PropsWithChildren} from "react";
2
import {LabelGroup} from "@patternfly/react-core";
3
4
export const Tags: FunctionComponent<PropsWithChildren> = ({children}) => {
5
- return <LabelGroup>
+ const numLabels = Children.toArray(children).length <= 4 ? 4 : 3;
6
+ return <LabelGroup numLabels={numLabels}>
7
{children}
8
</LabelGroup>;
9
};
0 commit comments