File tree Expand file tree Collapse file tree 1 file changed +41
-6
lines changed
dotcom-rendering/src/components/Card Expand file tree Collapse file tree 1 file changed +41
-6
lines changed Original file line number Diff line number Diff line change 11import { css } from '@emotion/react' ;
22import { isUndefined } from '@guardian/libs' ;
33import {
4+ between ,
45 from ,
56 palette as sourcePalette ,
67 space ,
8+ until ,
79} from '@guardian/source/foundations' ;
810import { Hide , Link , SvgCamera } from '@guardian/source/react-components' ;
911import {
@@ -753,12 +755,45 @@ export const Card = ({
753755 : undefined ;
754756
755757 return showLabsRedesign ? (
756- < SponsoredContentLabel
757- branding = { branding }
758- containerPalette = { containerPalette }
759- ophanComponentLink = { dataAttributes ?. ophanComponentLink }
760- ophanComponentName = { dataAttributes ?. ophanComponentName }
761- />
758+ < >
759+ { /** All screen sizes apart from tablet have horizontal orientation */ }
760+ < div
761+ css = { css `
762+ ${ between . tablet . and . desktop } {
763+ display : none;
764+ }
765+ ` }
766+ >
767+ < SponsoredContentLabel
768+ branding = { branding }
769+ containerPalette = { containerPalette }
770+ orientation = "horizontal"
771+ alignment = "end"
772+ ophanComponentLink = { dataAttributes ?. ophanComponentLink }
773+ ophanComponentName = { dataAttributes ?. ophanComponentName }
774+ />
775+ </ div >
776+ { /** Tablet sized screens have vertical orientation */ }
777+ < div
778+ css = { css `
779+ ${ until . tablet } {
780+ display : none;
781+ }
782+ ${ from . desktop } {
783+ display : none;
784+ }
785+ ` }
786+ >
787+ < SponsoredContentLabel
788+ branding = { branding }
789+ containerPalette = { containerPalette }
790+ orientation = "vertical"
791+ alignment = "end"
792+ ophanComponentLink = { dataAttributes ?. ophanComponentLink }
793+ ophanComponentName = { dataAttributes ?. ophanComponentName }
794+ />
795+ </ div >
796+ </ >
762797 ) : (
763798 < CardBranding
764799 branding = { branding }
You can’t perform that action at this time.
0 commit comments