@@ -2,21 +2,10 @@ import { css } from '@emotion/react';
22import { __ } from '@wordpress/i18n' ;
33import { useCallback , useEffect , useRef , useState } from 'react' ;
44
5- import Button from '@TutorShared/atoms/Button' ;
65import ImageInput from '@TutorShared/atoms/ImageInput' ;
76import SVGIcon from '@TutorShared/atoms/SVGIcon' ;
87
9- import {
10- borderRadius ,
11- Breakpoint ,
12- colorTokens ,
13- spacing ,
14- fontFamily ,
15- fontSize ,
16- fontWeight ,
17- lineHeight ,
18- letterSpacing ,
19- } from '@TutorShared/config/styles' ;
8+ import { borderRadius , Breakpoint , colorTokens , spacing } from '@TutorShared/config/styles' ;
209import { typography } from '@TutorShared/config/typography' ;
2110import Show from '@TutorShared/controls/Show' ;
2211import useWPMedia from '@TutorShared/hooks/useWpMedia' ;
@@ -528,15 +517,10 @@ const FormDrawImage = ({ field, precisionControl }: FormDrawImageProps) => {
528517 </ span >
529518 { __ ( 'Mark the correct area' , __TUTOR_TEXT_DOMAIN__ ) }
530519 </ span >
531- < Button
532- variant = "tertiary"
533- size = "small"
534- onClick = { handleClear }
535- icon = { < SVGIcon name = "eraser" width = { 18 } height = { 18 } style = { styles . clearIcon } /> }
536- css = { styles . clearButton }
537- >
520+ < button type = "button" css = { styles . clearButton } onClick = { handleClear } >
521+ < SVGIcon name = "eraser" style = { styles . clearButtonIcon } width = { 18 } height = { 18 } />
538522 { __ ( 'Clear' , __TUTOR_TEXT_DOMAIN__ ) }
539- </ Button >
523+ </ button >
540524 </ div >
541525 < div css = { styles . canvasInner } onMouseEnter = { handleCanvasMouseEnter } onMouseLeave = { handleCanvasMouseLeave } >
542526 < img
@@ -677,25 +661,19 @@ const styles = {
677661 ` ,
678662 clearButton : css `
679663 width: 94px;
680- height: 32px;
681- bor der- radius: 6px;
682664 bor der: none;
683- box- shadow: none;
684- padding: 4px 12px;
685- gap: 4px;
665+ bor der- radius: ${ borderRadius . input } ;
686666 background: ${ colorTokens . action . secondary . default } ;
667+ ${ typography . caption ( 'medium' ) } ;
668+ color : ${ colorTokens . text . brand } ;
669+ dis play: flex;
670+ justify- content: center;
671+ align- items: center;
672+ gap: ${ spacing [ 8 ] } ;
673+ padding: ${ spacing [ 4 ] } 0;
674+ ` ,
675+ clearButtonIcon : css `
687676 color : ${ colorTokens . text . brand } ;
688- font- family: ${ fontFamily . sfProDisplay } ;
689- font- weight: ${ fontWeight . medium } ;
690- font- size: ${ fontSize [ 13 ] } ;
691- line-height: ${ lineHeight [ 20 ] } ;
692- letter- spacing: ${ letterSpacing . normal } ;
693- text- align: center;
694- & : hover {
695- background : ${ colorTokens . action . secondary . hover } ;
696- border : none;
697- box-shadow : none;
698- }
699677 ` ,
700678 clearIcon : css `
701679 color : ${ colorTokens . text . brand } ;
0 commit comments