@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian products.
53 lines (50 loc) • 1.45 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SkeletonCreateButton = void 0;
var _react = require("@emotion/react");
var _theme = require("../../theme");
/** @jsx jsx */
var skeletonCreateButtonStyles = (0, _react.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)
*/
var SkeletonCreateButton = function SkeletonCreateButton(_ref) {
var text = _ref.text,
testId = _ref.testId;
var theme = (0, _theme.useTheme)();
return (0, _react.jsx)("button", {
style: theme.mode.create.default,
css: skeletonCreateButtonStyles,
"data-testid": testId,
type: "button"
}, text);
};
exports.SkeletonCreateButton = SkeletonCreateButton;