UNPKG

baseui

Version:

A React Component library implementing the Base design language

79 lines (76 loc) 2.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledTrailingIconButton = exports.StyledRoot = exports.StyledMessageContent = exports.StyledLeadingContent = void 0; var _styles = require("../styles"); var _banner = require("../banner"); var _responsiveHelpers = require("../helpers/responsive-helpers"); /* 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 StyledRoot = exports.StyledRoot = (0, _styles.withStyle)(_banner.StyledRoot, ({ $isButton, $theme }) => ({ ...($isButton ? { ':hover': { boxShadow: 'inset 999px 999px 0px rgba(0, 0, 0, 0.04)' }, ':active': { boxShadow: 'inset 999px 999px 0px rgba(0, 0, 0, 0.08)' }, // button style reset '-webkit-appearance': 'none', textAlign: 'inherit', boxShadow: 'none', cursor: 'pointer', border: 'none', alignItems: 'center' } : {}), ...(0, _responsiveHelpers.getMediaQueryPageMargins)($theme), ...(0, _responsiveHelpers.getMinimumPageMargins)($theme.grid.margins), borderRadius: 0, margin: 0 })); StyledRoot.displayName = "StyledRoot"; StyledRoot.displayName = 'StyledRoot'; const StyledLeadingContent = exports.StyledLeadingContent = (0, _styles.withStyle)(_banner.StyledLeadingContent, () => ({ padding: 0 })); StyledLeadingContent.displayName = "StyledLeadingContent"; StyledLeadingContent.displayName = 'StyledLeadingContent'; const StyledTrailingIconButton = exports.StyledTrailingIconButton = (0, _styles.withStyle)(_banner.StyledTrailingIconButton, () => ({ ':hover': { boxShadow: 'none' }, ':active': { boxShadow: 'none' } })); StyledTrailingIconButton.displayName = "StyledTrailingIconButton"; StyledTrailingIconButton.displayName = 'StyledTrailingIconButton'; const StyledMessageContent = exports.StyledMessageContent = (0, _styles.withStyle)(_banner.StyledMessageContent, () => ({ // button styles reset backgroundColor: 'transparent', borderBottomWidth: 0, borderLeftWidth: 0, borderRightWidth: 0, borderTopWidth: 0, fontFamily: 'inherit', fontSize: 'inherit', fontStyle: 'inherit', fontWeight: 'inherit', lineHeight: 'inherit', cursor: 'pointer', ':hover': { boxShadow: 'inset 999px 999px 0px rgba(0, 0, 0, 0.04)' }, ':active': { boxShadow: 'inset 999px 999px 0px rgba(0, 0, 0, 0.08)' } })); StyledMessageContent.displayName = "StyledMessageContent"; StyledMessageContent.displayName = 'StyledMessageContent';