fix ui bug

This commit is contained in:
Eduard Heimbuch
2019-10-16 17:28:06 +02:00
parent 453010c633
commit 016eea56e8
2 changed files with 21 additions and 15 deletions

View File

@@ -1,6 +1,13 @@
// @flow
import * as React from "react";
import classNames from "classnames";
import styled from "styled-components";
const Flex = styled.div`
&.field:not(:last-child) {
margin-bottom: 0;
}
`;
type Props = {
className?: string,
@@ -14,14 +21,18 @@ class ButtonAddons extends React.Component<Props> {
const childWrapper = [];
React.Children.forEach(children, child => {
if (child) {
childWrapper.push(<p className="control" key={childWrapper.length}>{child}</p>);
childWrapper.push(
<p className="control" key={childWrapper.length}>
{child}
</p>
);
}
});
return (
<div className={classNames("field", "has-addons", className)}>
<Flex className={classNames("field", "has-addons", className)}>
{childWrapper}
</div>
</Flex>
);
}
}