@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian products.
41 lines (40 loc) • 1.39 kB
JavaScript
import _defineProperty from "@babel/runtime/helpers/defineProperty";
/** @jsx jsx */
import { Fragment } from 'react';
import { css, jsx } from '@emotion/react';
import { CREATE_BREAKPOINT, gridSize } from '../../common/constants';
import { useTheme } from '../../theme';
import { IconButtonSkeleton } from '../IconButton/skeleton';
var searchInputContainerStyles = css(_defineProperty({
marginRight: gridSize,
marginLeft: 20,
position: 'relative'
}, "@media (max-width: ".concat(CREATE_BREAKPOINT - 1, "px)"), {
display: 'none !important'
}));
var searchInputSkeletonStyles = css({
boxSizing: 'border-box',
width: '220px',
height: "".concat(gridSize * 4, "px"),
padding: "0 ".concat(gridSize, "px 0 40px"),
borderRadius: 6,
opacity: 0.15
});
var searchIconStyles = css(_defineProperty({}, "@media (min-width: ".concat(CREATE_BREAKPOINT, "px)"), {
display: 'none !important'
}));
// Not exported to consumers, only used in NavigationSkeleton
// eslint-disable-next-line @repo/internal/react/require-jsdoc
export var SearchSkeleton = function SearchSkeleton() {
var theme = useTheme();
return jsx(Fragment, null, jsx("div", {
css: searchInputContainerStyles
}, jsx("div", {
style: theme.mode.skeleton,
css: searchInputSkeletonStyles
})), jsx(IconButtonSkeleton, {
css: searchIconStyles,
marginRight: 5,
size: gridSize * 3.25
}));
};