Skip to content

Commit

Permalink
Convert our full page Loading component to an Enterprise Search logo (#…
Browse files Browse the repository at this point in the history
…103189) (#103206)

- while keeping our component-level LoadingOverlay to a spinner

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
  • Loading branch information
kibanamachine and Constance authored Jun 24, 2021
1 parent 5d0ff2e commit dc4731a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ import React from 'react';

import { shallow } from 'enzyme';

import { EuiLoadingSpinner } from '@elastic/eui';
import { EuiLoadingLogo, EuiLoadingSpinner } from '@elastic/eui';

import { Loading, LoadingOverlay } from './';

describe('Loading', () => {
it('renders', () => {
const wrapper = shallow(<Loading />);
expect(wrapper.hasClass('enterpriseSearchLoading')).toBe(true);
expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(1);
expect(wrapper.find(EuiLoadingLogo)).toHaveLength(1);
});
});

describe('LoadingOverlay', () => {
it('renders', () => {
const wrapper = shallow(<LoadingOverlay />);
expect(wrapper.hasClass('enterpriseSearchLoadingOverlay')).toBe(true);
expect(wrapper.find(Loading)).toHaveLength(1);
expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(1);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@

import React from 'react';

import { EuiLoadingSpinner } from '@elastic/eui';
import { EuiLoadingLogo, EuiLoadingSpinner } from '@elastic/eui';

import './loading.scss';

export const Loading: React.FC = () => (
<div className="enterpriseSearchLoading">
<EuiLoadingSpinner size="xl" />
<EuiLoadingLogo size="xl" logo="logoEnterpriseSearch" />
</div>
);

export const LoadingOverlay: React.FC = () => (
<div className="enterpriseSearchLoadingOverlay">
<Loading />
<div className="enterpriseSearchLoading">
<EuiLoadingSpinner size="xl" />
</div>
</div>
);

0 comments on commit dc4731a

Please sign in to comment.