{React.Children.map(children, (child, index) => {
@@ -56,25 +59,28 @@ export const Container: React.FC
= ({ children, padding, margin
return {children}
;
};
-const getStyles = stylesFactory((theme: GrafanaTheme, orientation: Orientation, spacing: Spacing, justify: Justify) => {
- return {
- layout: css`
- display: flex;
- flex-direction: ${orientation === Orientation.Vertical ? 'column' : 'row'};
- justify-content: ${justify};
- height: 100%;
- `,
- buttonWrapper: css`
- margin-bottom: ${orientation === Orientation.Horizontal ? 0 : theme.spacing[spacing]};
- margin-right: ${orientation === Orientation.Horizontal ? theme.spacing[spacing] : 0};
+const getStyles = stylesFactory(
+ (theme: GrafanaTheme, orientation: Orientation, spacing: Spacing, justify: Justify, align) => {
+ return {
+ layout: css`
+ display: flex;
+ flex-direction: ${orientation === Orientation.Vertical ? 'column' : 'row'};
+ justify-content: ${justify};
+ align-items: ${align};
+ height: 100%;
+ `,
+ buttonWrapper: css`
+ margin-bottom: ${orientation === Orientation.Horizontal ? 0 : theme.spacing[spacing]};
+ margin-right: ${orientation === Orientation.Horizontal ? theme.spacing[spacing] : 0};
- &:last-child {
- margin-bottom: 0;
- margin-right: 0;
- }
- `,
- };
-});
+ &:last-child {
+ margin-bottom: 0;
+ margin-right: 0;
+ }
+ `,
+ };
+ }
+);
const getContainerStyles = stylesFactory((theme: GrafanaTheme, padding?: Spacing, margin?: Spacing) => {
const paddingSize = (padding && theme.spacing[padding]) || 0;