@@ -35,9 +35,16 @@ type ButtonKind = 'native' | 'copy' | 'email';
3535
3636type Context = 'ArticleMeta' | 'LiveBlock' | 'SubMeta' | 'ImageCaption' ;
3737
38- const sharedButtonStyles = ( sizeXSmall : boolean ) => css `
38+ const sharedButtonStyles = (
39+ sizeXSmall : boolean ,
40+ context : Context ,
41+ format : ArticleFormat ,
42+ ) => css `
3943 transition : none;
40- border-color : ${ sizeXSmall
44+ border-color : ${ format . design === ArticleDesign . Gallery &&
45+ context == 'ArticleMeta'
46+ ? themePalette ( '--share-button-border-meta' )
47+ : sizeXSmall
4148 ? themePalette ( '--share-button-xsmall-border' )
4249 : themePalette ( '--share-button-border' ) } ;
4350 height : ${ sizeXSmall ? '24px' : '36px' } ;
@@ -123,11 +130,15 @@ export const CopyNativeShareButton = ({
123130 size,
124131 isLiveBlogMeta,
125132 isCopied,
133+ context,
134+ format,
126135} : {
127136 onShare : ( ) => void ;
128137 size ?: Size ;
129138 isLiveBlogMeta : boolean ;
130139 isCopied : boolean ;
140+ context : Context ;
141+ format : ArticleFormat ;
131142} ) => {
132143 const sizeXSmall = size === 'xsmall' ;
133144 return (
@@ -142,7 +153,7 @@ export const CopyNativeShareButton = ({
142153 ...( isCopied
143154 ? [ copiedButtonStyles ( sizeXSmall ) ]
144155 : [ buttonStyles ( sizeXSmall ) ] ) ,
145- sharedButtonStyles ( sizeXSmall ) ,
156+ sharedButtonStyles ( sizeXSmall , context , format ) ,
146157 isLiveBlogMeta && liveBlogMobileMeta ( isCopied ) ,
147158 ] ) }
148159 data-gu-name = "share-button"
@@ -156,10 +167,14 @@ export const EmailLink = ({
156167 href,
157168 size,
158169 isLiveBlogMeta,
170+ format,
171+ context,
159172} : {
160173 href : string ;
161174 size ?: Size ;
162175 isLiveBlogMeta : boolean ;
176+ format : ArticleFormat ;
177+ context : Context ;
163178} ) => {
164179 const sizeXSmall = size === 'xsmall' ;
165180 return (
@@ -172,7 +187,7 @@ export const EmailLink = ({
172187 icon = { < SvgShareWeb /> }
173188 cssOverrides = { css ( [
174189 buttonStyles ( sizeXSmall ) ,
175- sharedButtonStyles ( sizeXSmall ) ,
190+ sharedButtonStyles ( sizeXSmall , context , format ) ,
176191 isLiveBlogMeta && liveBlogMobileMeta ( false ) ,
177192 ] ) }
178193 >
@@ -261,6 +276,8 @@ export const ShareButton = ({
261276 size = { size }
262277 isLiveBlogMeta = { isLiveBlogMeta }
263278 isCopied = { isCopied }
279+ context = { context }
280+ format = { format }
264281 />
265282 ) ;
266283 case 'copy' :
@@ -277,6 +294,8 @@ export const ShareButton = ({
277294 size = { size }
278295 isLiveBlogMeta = { isLiveBlogMeta }
279296 isCopied = { isCopied }
297+ context = { context }
298+ format = { format }
280299 />
281300 ) ;
282301 case 'email' :
@@ -285,6 +304,8 @@ export const ShareButton = ({
285304 href = { `mailto:?subject=${ webTitle } &body=${ shareData . url } ` }
286305 size = { size }
287306 isLiveBlogMeta = { isLiveBlogMeta }
307+ context = { context }
308+ format = { format }
288309 />
289310 ) ;
290311 }
0 commit comments