-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docs EuiEmptyPrompt] Add new page not found illustration (#6061)
* [Docs EuiEmptyPrompt] Add new 404 illustration * Adding `alt` descriptions * Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx Co-authored-by: Greg Thompson <[email protected]> * Better `alt` description Co-authored-by: Greg Thompson <[email protected]>
- Loading branch information
1 parent
fcacc28
commit 26c3387
Showing
9 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,11 @@ import { | |
IconType, | ||
} from '../../../../src/components'; | ||
|
||
import pageNotFoundLight from '../../images/empty-prompt/404_rainy_cloud_light.png'; | ||
import pageNotFoundDark from '../../images/empty-prompt/404_rainy_cloud_dark.png'; | ||
import pageNotFoundDark from '../../images/empty-prompt/pageNotFound--dark.png'; | ||
import pageNotFoundLight from '../../images/empty-prompt/pageNotFound--light.png'; | ||
import pageNotFoundDark2x from '../../images/empty-prompt/[email protected]'; | ||
import pageNotFoundLight2x from '../../images/empty-prompt/[email protected]'; | ||
|
||
import noResultsLight from '../../images/empty-prompt/no-results--light.svg'; | ||
import noResultsDark from '../../images/empty-prompt/no-results--dark.svg'; | ||
|
||
|
@@ -31,7 +34,10 @@ export const typesOfUseCases: { | |
iconLoading?: ReactNode; | ||
iconLight?: string; | ||
iconDark?: string; | ||
iconLight2x?: string; | ||
iconDark2x?: string; | ||
iconType?: IconType; | ||
alt?: string; | ||
title: ReactNode; | ||
body?: ReactNode; | ||
actions?: ReactNode[]; | ||
|
@@ -218,7 +224,11 @@ export const typesOfUseCases: { | |
example: { | ||
iconLight: pageNotFoundLight, | ||
iconDark: pageNotFoundDark, | ||
iconLight2x: pageNotFoundLight2x, | ||
iconDark2x: pageNotFoundDark2x, | ||
title: <h2>Page not found</h2>, | ||
alt: | ||
"An outer space illustration. In the background is a large moon and two planets. In the foreground is an astronaut floating in space and the numbers '404'.", | ||
body: ( | ||
<p> | ||
Sorry, we can't find the page you're looking for. It might | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,19 +6,30 @@ import { | |
EuiButtonEmpty, | ||
} from '../../../../../src/components'; | ||
import { ThemeContext } from '../../../components/with_theme'; | ||
import pageNotFoundLight from '../../../images/empty-prompt/404_rainy_cloud_light.png'; | ||
import pageNotFoundDark from '../../../images/empty-prompt/404_rainy_cloud_dark.png'; | ||
|
||
import pageNotFoundDark from '../../../images/empty-prompt/pageNotFound--dark.png'; | ||
import pageNotFoundLight from '../../../images/empty-prompt/pageNotFound--light.png'; | ||
import pageNotFoundDark2x from '../../../images/empty-prompt/[email protected]'; | ||
import pageNotFoundLight2x from '../../../images/empty-prompt/[email protected]'; | ||
|
||
export default () => { | ||
const themeContext = useContext(ThemeContext); | ||
const isDarkTheme = themeContext.theme.includes('dark'); | ||
|
||
const iconImg: string = isDarkTheme ? pageNotFoundDark : pageNotFoundLight; | ||
const pageNotFound = isDarkTheme ? pageNotFoundDark : pageNotFoundLight; | ||
const pageNotFound2x = isDarkTheme ? pageNotFoundDark2x : pageNotFoundLight2x; | ||
|
||
return ( | ||
<EuiEmptyPrompt | ||
color="subdued" | ||
icon={<EuiImage size="fullWidth" src={iconImg} alt="" />} | ||
icon={ | ||
<EuiImage | ||
size="fullWidth" | ||
srcSet={`${pageNotFound} 1x, ${pageNotFound2x} 2x`} | ||
src={pageNotFound} | ||
alt="An outer space illustration. In the background is a large moon and two planets. In the foreground is an astronaut floating in space and the numbers '404'." | ||
/> | ||
} | ||
title={<h2>Page not found</h2>} | ||
layout="vertical" | ||
body={ | ||
|