baseui
Version:
A React Component library implementing the Base design language
49 lines (46 loc) • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StyledDivider = void 0;
var _styles = require("../styles");
var _constants = require("./constants");
/*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
const StyledDivider = exports.StyledDivider = (0, _styles.styled)('hr', props => {
const {
$theme,
$size = _constants.SIZE.section
} = props;
if ($size === _constants.SIZE.module) {
return {
borderTopWidth: $theme.sizing.scale100,
borderTopColor: $theme.colors.borderOpaque,
borderTopStyle: 'solid',
// base styles
borderRightWidth: 0,
borderBottomWidth: 0,
borderLeftWidth: 0,
borderRightStyle: 'none',
borderBottomStyle: 'none',
borderLeftStyle: 'none'
};
}
return {
borderTopWidth: '1px',
borderTopColor: $theme.colors.borderOpaque,
borderTopStyle: 'solid',
// base styles
borderRightWidth: 0,
borderBottomWidth: 0,
borderLeftWidth: 0,
borderRightStyle: 'none',
borderBottomStyle: 'none',
borderLeftStyle: 'none'
};
});
StyledDivider.displayName = "StyledDivider";
StyledDivider.displayName = 'StyledDivider';