Skip to content

Commit

Permalink
Convert loading components to TS, fix ie11 shadow (#1683)
Browse files Browse the repository at this point in the history
Converts the loading components over to typescript.
  • Loading branch information
snide authored Mar 7, 2019
1 parent 5d02ff2 commit cb5c369
Show file tree
Hide file tree
Showing 31 changed files with 514 additions and 381 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
- Added `fullWidth` prop to `EuiButton` ([#1665](https://github.com/elastic/eui/pull/1665))
- Added `.eui-fullWidth` utility class ([#1665](https://github.com/elastic/eui/pull/1665))
- Added `EuiPopoverFooter` and converted `EuiPopoverTitle` to TS ([#1666](https://github.com/elastic/eui/pull/1666))
- Converted `EuiLoadingSpinner`, `EuiLoadingKibana`, and `EuiLoadingChart` to TS ([#1683](https://github.com/elastic/eui/pull/1683))

**Bug fixes**

- Fixed IE11 rendering issue in `EuiLoadingKibana` ([#1683](https://github.com/elastic/eui/pull/1683))

**Bug fixes**

Expand Down
32 changes: 0 additions & 32 deletions src-docs/src/views/loading/loading_chart.js

This file was deleted.

20 changes: 20 additions & 0 deletions src-docs/src/views/loading/loading_chart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';

import { EuiLoadingChart } from '../../../../src/components/loading';

export default () => (
<div>
<EuiLoadingChart size="m" />
&nbsp;&nbsp;
<EuiLoadingChart size="l" />
&nbsp;&nbsp;
<EuiLoadingChart size="xl" />
<br />
<br />
<EuiLoadingChart size="m" mono />
&nbsp;&nbsp;
<EuiLoadingChart size="l" mono />
&nbsp;&nbsp;
<EuiLoadingChart size="xl" mono />
</div>
);
3 changes: 3 additions & 0 deletions src-docs/src/views/loading/loading_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const LoadingExample = {
),
props: { EuiLoadingKibana },
demo: <LoadingKibana />,
snippet: `<EuiLoadingKibana size="m" />`
}, {
title: 'Chart',
source: [{
Expand All @@ -61,6 +62,7 @@ export const LoadingExample = {
),
props: { EuiLoadingChart },
demo: <LoadingChart />,
snippet: `<EuiLoadingChart size="m" />`
}, {
title: 'Spinner',
source: [{
Expand All @@ -77,5 +79,6 @@ export const LoadingExample = {
),
props: { EuiLoadingSpinner },
demo: <LoadingSpinner />,
snippet: `<EuiLoadingSpinner size="m" />`
}],
};
13 changes: 0 additions & 13 deletions src-docs/src/views/loading/loading_kibana.js

This file was deleted.

11 changes: 11 additions & 0 deletions src-docs/src/views/loading/loading_kibana.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

import { EuiLoadingKibana } from '../../../../src/components/loading';

export default () => (
<div>
<EuiLoadingKibana size="m" />
<EuiLoadingKibana size="l" />
<EuiLoadingKibana size="xl" />
</div>
);
24 changes: 0 additions & 24 deletions src-docs/src/views/loading/loading_spinner.js

This file was deleted.

15 changes: 15 additions & 0 deletions src-docs/src/views/loading/loading_spinner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';

import { EuiLoadingSpinner } from '../../../../src/components/loading';

export default () => (
<div>
<EuiLoadingSpinner size="s" />
&nbsp;&nbsp;
<EuiLoadingSpinner size="m" />
&nbsp;&nbsp;
<EuiLoadingSpinner size="l" />
&nbsp;&nbsp;
<EuiLoadingSpinner size="xl" />
</div>
);
1 change: 0 additions & 1 deletion src/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/// <reference path="./health/index.d.ts" />
/// <reference path="./key_pad_menu/index.d.ts" />
/// <reference path="./link/index.d.ts" />
/// <reference path="./loading/index.d.ts" />
/// <reference path="./modal/index.d.ts" />
/// <reference path="./observer/mutation_observer/index.d.ts" />
/// <reference path="./observer/resize_observer/index.d.ts" />
Expand Down
41 changes: 0 additions & 41 deletions src/components/loading/__snapshots__/loading_chart.test.js.snap

This file was deleted.

98 changes: 98 additions & 0 deletions src/components/loading/__snapshots__/loading_chart.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`EuiLoadingChart is rendered 1`] = `
<div
aria-label="aria-label"
class="euiLoadingChart testClass1 testClass2 euiLoadingChart--medium"
data-test-subj="test subject string"
>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
</div>
`;

exports[`EuiLoadingChart mono is rendered 1`] = `
<div
class="euiLoadingChart euiLoadingChart--mono euiLoadingChart--medium"
>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
</div>
`;

exports[`EuiLoadingChart size l is rendered 1`] = `
<div
class="euiLoadingChart euiLoadingChart--large"
>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
</div>
`;

exports[`EuiLoadingChart size m is rendered 1`] = `
<div
class="euiLoadingChart euiLoadingChart--medium"
>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
</div>
`;

exports[`EuiLoadingChart size xl is rendered 1`] = `
<div
class="euiLoadingChart euiLoadingChart--xLarge"
>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
<div
class="euiLoadingChart__bar"
/>
</div>
`;
40 changes: 0 additions & 40 deletions src/components/loading/__snapshots__/loading_kibana.test.js.snap

This file was deleted.

Loading

0 comments on commit cb5c369

Please sign in to comment.