@elastic/eui
Version:
Elastic UI Component Library
36 lines (35 loc) • 1.51 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["size", "className", "aria-label"];
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import React from 'react';
import classNames from 'classnames';
import { EuiIcon } from '../icon';
import { useLoadingAriaLabel } from './_loading_strings';
import { euiLoadingElasticStyles as styles } from './loading_elastic.styles';
import { jsx as ___EmotionJSX } from "@emotion/react";
export var SIZES = ['m', 'l', 'xl', 'xxl'];
export var EuiLoadingElastic = function EuiLoadingElastic(_ref) {
var _ref$size = _ref.size,
size = _ref$size === void 0 ? 'm' : _ref$size,
className = _ref.className,
ariaLabel = _ref['aria-label'],
rest = _objectWithoutProperties(_ref, _excluded);
var classes = classNames('euiLoadingElastic', className);
var defaultLabel = useLoadingAriaLabel();
return ___EmotionJSX("span", _extends({
className: classes,
css: styles.euiLoadingElastic,
role: "progressbar",
"aria-label": ariaLabel || defaultLabel
}, rest), ___EmotionJSX(EuiIcon, {
type: "logoElastic",
size: size
}));
};