@@ -9,19 +9,10 @@ import { useSelect, useDispatch } from '@wordpress/data';
99/**
1010 * Internal dependencies
1111 */
12- import {
13- Card as CardComponent ,
14- CardFooter as CardFooterComponent ,
15- CardMedia as CardMediaComponent ,
16- Icon ,
17- } from '@wordpress/components' ;
12+ import { Card , CardFooter , CardMedia , Icon } from '@wordpress/components' ;
1813import { removeQueryArgs } from '@wordpress/url' ;
1914import { STORE_KEY as ONBOARD_STORE } from '../../stores/onboard' ;
2015
21- const Card = CardComponent . withComponent ( 'button' ) ;
22- const CardFooter = CardFooterComponent . withComponent ( 'span' ) ;
23- const CardMedia = CardMediaComponent . withComponent ( 'span' ) ;
24-
2516type Template = import ( '@automattic/data-stores' ) . VerticalsTemplates . Template ;
2617
2718interface Props {
@@ -48,18 +39,19 @@ const PageLayoutSelector: FunctionComponent< Props > = ( { templates } ) => {
4839 'is-selected' : pageLayouts . includes ( template . slug ) ,
4940 } ) }
5041 onClick = { ( ) => togglePageLayout ( template ) }
42+ as = "button"
5143 key = { template . slug }
5244 >
5345 < span className = "page-layout-selector__selected-indicator" >
5446 < Icon icon = "yes" size = { 24 } />
5547 </ span >
56- < CardMedia className = "page-layout-selector__card-media" >
48+ < CardMedia className = "page-layout-selector__card-media" as = "span" >
5749 < img
5850 alt = { template . description }
5951 src = { removeQueryArgs ( template . preview , 'w' ) }
6052 />
6153 </ CardMedia >
62- < CardFooter className = "page-layout-selector__card-footer" >
54+ < CardFooter className = "page-layout-selector__card-footer" as = "span" >
6355 { template . title }
6456 </ CardFooter >
6557 </ Card >
0 commit comments