UNPKG

@atlaskit/atlassian-navigation

Version:

A horizontal navigation component for Atlassian products.

33 lines (32 loc) 1.01 kB
/** @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'; const buttonHeight = gridSize * 4; const skeletonStyles = css({ width: 68, height: buttonHeight, marginLeft: 12, borderRadius: 3, opacity: 0.15 }); const mobileStyles = css({ // eslint-disable-next-line @repo/internal/styles/no-nested-styles [`@media (max-width: ${CREATE_BREAKPOINT - 1}px)`]: { display: 'none !important' } }); // Not exported to consumers, only used in NavigationSkeleton // eslint-disable-next-line @repo/internal/react/require-jsdoc export const CreateSkeleton = () => { const theme = useTheme(); return jsx(Fragment, null, jsx("div", { style: theme.mode.skeleton, css: [skeletonStyles, mobileStyles] }), jsx(IconButtonSkeleton, { css: mobileStyles, size: gridSize * 3.25 })); };