Debian Codegraph @

node/@patternfly/react-core/src/components/ActionList/ActionList.tsx

raw
1 import { css } from '@patternfly/react-styles';
2 import styles from '@patternfly/react-styles/css/components/ActionList/action-list';
3
4 export interface ActionListProps extends React.HTMLProps<HTMLDivElement> {
5 /** Children of the action list */
6 children?: React.ReactNode;
7 /** Flag indicating the action list contains multiple icons and item padding should be removed */
8 isIconList?: boolean;
9 /** Additional classes added to the action list */
10 className?: string;
11 /** @beta Whether the layout of children is vertical or horizontal. */
12 isVertical?: boolean;
13 }
14
15 export const ActionList: React.FunctionComponent<ActionListProps> = ({
16 children,
17 isIconList,
18 className,
19 isVertical = false,
20 ...props
21 }: ActionListProps) => (
22 <div
23 className={css(
24 styles.actionList,
25 isIconList && styles.modifiers.icons,
26 isVertical && styles.modifiers.vertical,
27 className
28 )}
29 {...props}
30 >
31 {children}
32 </div>
33 );
34 ActionList.displayName = 'ActionList';