diff --git a/packages/customize-widgets/src/components/welcome-guide/images.js b/packages/customize-widgets/src/components/welcome-guide/images.js deleted file mode 100644 index efdfbe2de6bb5c..00000000000000 --- a/packages/customize-widgets/src/components/welcome-guide/images.js +++ /dev/null @@ -1,16 +0,0 @@ -export const EditorImage = ( props ) => ( -
- - -
-); diff --git a/packages/customize-widgets/src/components/welcome-guide/index.js b/packages/customize-widgets/src/components/welcome-guide/index.js index da07909e705ab9..d897111e598787 100644 --- a/packages/customize-widgets/src/components/welcome-guide/index.js +++ b/packages/customize-widgets/src/components/welcome-guide/index.js @@ -8,7 +8,6 @@ import { useDispatch } from '@wordpress/data'; /** * Internal dependencies */ -import { EditorImage } from './images'; import { store as customizeWidgetsStore } from '../../store'; export default function WelcomeGuide( { sidebar } ) { @@ -22,7 +21,18 @@ export default function WelcomeGuide( { sidebar } ) { return (
- + + + +

{ __( 'Welcome to block Widgets' ) }

diff --git a/packages/customize-widgets/src/components/welcome-guide/style.scss b/packages/customize-widgets/src/components/welcome-guide/style.scss index a558ed644e8ed4..3baacc37a25913 100644 --- a/packages/customize-widgets/src/components/welcome-guide/style.scss +++ b/packages/customize-widgets/src/components/welcome-guide/style.scss @@ -5,24 +5,6 @@ margin-bottom: $grid-unit-10; } - &__image { - height: 240px; - - &__prm-r { - display: none; - } - - @media (prefers-reduced-motion: reduce) { - &__prm-r { - display: block; - } - - &__prm-np { - display: none; - } - } - } - // Extra specificity to override `.wrap h1` styles. .wrap &__heading { font-size: 18px; diff --git a/packages/edit-post/src/components/welcome-guide/default.js b/packages/edit-post/src/components/welcome-guide/default.js index f5f854420daa01..d83eab0fa13ddb 100644 --- a/packages/edit-post/src/components/welcome-guide/default.js +++ b/packages/edit-post/src/components/welcome-guide/default.js @@ -9,16 +9,7 @@ import { createInterpolateElement } from '@wordpress/element'; /** * Internal dependencies */ -/** - * Internal dependencies - */ -import { - CanvasImage, - EditorImage, - BlockLibraryImage, - DocumentationImage, - InserterIconImage, -} from './images'; +import WelcomeGuideImage from './image'; import { store as editPostStore } from '../../store'; export default function WelcomeGuideDefault() { @@ -32,7 +23,12 @@ export default function WelcomeGuideDefault() { onFinish={ () => toggleFeature( 'welcomeGuide' ) } pages={ [ { - image: , + image: ( + + ), content: ( <>

@@ -47,7 +43,12 @@ export default function WelcomeGuideDefault() { ), }, { - image: , + image: ( + + ), content: ( <>

@@ -62,7 +63,12 @@ export default function WelcomeGuideDefault() { ), }, { - image: , + image: ( + + ), content: ( <>

@@ -75,7 +81,10 @@ export default function WelcomeGuideDefault() { ), { InserterIconImage: ( - + { ), } ) } @@ -84,7 +93,12 @@ export default function WelcomeGuideDefault() { ), }, { - image: , + image: ( + + ), content: ( <>

diff --git a/packages/edit-post/src/components/welcome-guide/image.js b/packages/edit-post/src/components/welcome-guide/image.js new file mode 100644 index 00000000000000..6e95913c4254c7 --- /dev/null +++ b/packages/edit-post/src/components/welcome-guide/image.js @@ -0,0 +1,11 @@ +export default function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) { + return ( + + + + + ); +} diff --git a/packages/edit-post/src/components/welcome-guide/images.js b/packages/edit-post/src/components/welcome-guide/images.js deleted file mode 100644 index 16d48bc5ec4270..00000000000000 --- a/packages/edit-post/src/components/welcome-guide/images.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; - -export const CanvasImage = ( props ) => ( - <> - - - -); - -export const EditorImage = ( props ) => ( - <> - - - -); - -export const BlockLibraryImage = ( props ) => ( - <> - - - -); - -export const DocumentationImage = ( props ) => ( - <> - - - -); - -export const TemplateEditorImage = ( props ) => ( - <> - - - -); - -export const InserterIconImage = ( props ) => ( - { -); diff --git a/packages/edit-post/src/components/welcome-guide/style.scss b/packages/edit-post/src/components/welcome-guide/style.scss index 1697a694b6291e..5bdba26b7207e8 100644 --- a/packages/edit-post/src/components/welcome-guide/style.scss +++ b/packages/edit-post/src/components/welcome-guide/style.scss @@ -1,26 +1,9 @@ .edit-post-welcome-guide { - $image-height: 240px; - $image-width: 312px; width: 312px; &__image { background: #00a0d2; - height: 240px; margin: 0 0 $grid-unit-20; - - &__prm-r { - display: none; - } - - @media (prefers-reduced-motion: reduce) { - &__prm-r { - display: block; - } - - &__prm-np { - display: none; - } - } } &__heading { diff --git a/packages/edit-post/src/components/welcome-guide/template.js b/packages/edit-post/src/components/welcome-guide/template.js index 2a4384722af24a..360b9c768ed0c1 100644 --- a/packages/edit-post/src/components/welcome-guide/template.js +++ b/packages/edit-post/src/components/welcome-guide/template.js @@ -8,7 +8,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ -import { TemplateEditorImage } from './images'; +import WelcomeGuideImage from './image'; import { store as editPostStore } from '../../store'; export default function WelcomeGuideTemplate() { @@ -22,7 +22,12 @@ export default function WelcomeGuideTemplate() { onFinish={ () => toggleFeature( 'welcomeGuideTemplate' ) } pages={ [ { - image: , + image: ( + + ), content: ( <>

diff --git a/packages/edit-widgets/src/components/welcome-guide/images.js b/packages/edit-widgets/src/components/welcome-guide/images.js deleted file mode 100644 index 9c3f42a139928a..00000000000000 --- a/packages/edit-widgets/src/components/welcome-guide/images.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; - -export const CanvasImage = ( props ) => ( - <> - - - -); - -export const EditorImage = ( props ) => ( - <> - - - -); - -export const BlockLibraryImage = ( props ) => ( - <> - - - -); - -export const DocumentationImage = ( props ) => ( - <> - - - -); - -export const InserterIconImage = ( props ) => ( - { -); diff --git a/packages/edit-widgets/src/components/welcome-guide/index.js b/packages/edit-widgets/src/components/welcome-guide/index.js index 28b76cfc7a5f9e..1dbaa753a87192 100644 --- a/packages/edit-widgets/src/components/welcome-guide/index.js +++ b/packages/edit-widgets/src/components/welcome-guide/index.js @@ -9,13 +9,6 @@ import { createInterpolateElement } from '@wordpress/element'; /** * Internal dependencies */ -import { - CanvasImage, - EditorImage, - BlockLibraryImage, - DocumentationImage, - InserterIconImage, -} from './images'; import { store as editWidgetsStore } from '../../store'; export default function WelcomeGuide() { @@ -60,7 +53,12 @@ export default function WelcomeGuide() { onFinish={ () => toggleFeature( 'welcomeGuide' ) } pages={ [ { - image: , + image: ( + + ), content: ( <>

@@ -109,7 +107,12 @@ export default function WelcomeGuide() { ), }, { - image: , + image: ( + + ), content: ( <>

@@ -124,7 +127,12 @@ export default function WelcomeGuide() { ), }, { - image: , + image: ( + + ), content: ( <>

@@ -137,7 +145,11 @@ export default function WelcomeGuide() { ), { InserterIconImage: ( - + { ), } ) } @@ -146,7 +158,12 @@ export default function WelcomeGuide() { ), }, { - image: , + image: ( + + ), content: ( <>

@@ -171,3 +188,15 @@ export default function WelcomeGuide() { /> ); } + +function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) { + return ( + + + + + ); +} diff --git a/packages/edit-widgets/src/components/welcome-guide/style.scss b/packages/edit-widgets/src/components/welcome-guide/style.scss index f05b921db35510..286128e1e4d8ad 100644 --- a/packages/edit-widgets/src/components/welcome-guide/style.scss +++ b/packages/edit-widgets/src/components/welcome-guide/style.scss @@ -1,26 +1,9 @@ .edit-widgets-welcome-guide { - $image-height: 240px; - $image-width: 312px; width: 312px; &__image { background: #00a0d2; - height: 240px; margin: 0 0 $grid-unit-20; - - &__prm-r { - display: none; - } - - @media (prefers-reduced-motion: reduce) { - &__prm-r { - display: block; - } - - &__prm-np { - display: none; - } - } } &__heading {