@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian products.
45 lines (44 loc) • 1.26 kB
JavaScript
/** @jsx jsx */
import { css, jsx } from '@emotion/react';
import { useTheme } from '../../theme';
var skeletonCreateButtonStyles = css({
height: 32,
padding: '0 12px',
alignSelf: 'center',
border: 0,
borderRadius: 3,
fontSize: 14,
fontWeight: 500,
lineHeight: 1,
pointerEvents: 'none',
':focus, :active, :hover': {
appearance: 'none',
border: 0,
outline: 0
},
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
'&&': {
marginLeft: 12
}
});
/**
* __Skeleton create button__
*
* Skeleton buttons are lightweight HTML button elements with CSS that represent
* their heavier interactive counterparts, for use when elements of the
* navigation are loaded dynamically. This one represents the Create button.
*
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
*/
export var SkeletonCreateButton = function SkeletonCreateButton(_ref) {
var text = _ref.text,
testId = _ref.testId;
var theme = useTheme();
return jsx("button", {
style: theme.mode.create.default,
css: skeletonCreateButtonStyles,
"data-testid": testId,
type: "button"
}, text);
};