import React from "react";
import styled from "styled-components";
import Flex from "../../layout/Flex";
import Text from "../../asorted/Text";
const DividerBase = styled(Flex).attrs((p) => ({
    my: p.my || 0,
    height: 1,
    backgroundColor: p.color || "neutral.c40",
})) `
  &[data-variant="light"] {
    background: ${p => p.theme.colors.neutral.c30};
  }
`;
const Divider = props => {
    if (!props.text)
        return React.createElement(DividerBase, Object.assign({}, props));
    return (React.createElement(Flex, Object.assign({}, props, { flexDirection: "row", alignItems: "center" }),
        React.createElement(DividerBase, { my: 6, flex: 1 }),
        React.createElement(Text, { variant: "bodyLineHeight", color: "neutral.c60", mx: 6 }, props.text),
        React.createElement(DividerBase, { my: 6, flex: 1 })));
};
export default Divider;
//# sourceMappingURL=index.js.map