@@ -11,13 +11,11 @@ function FontFamily ( { fontFamily, fontFamilyIndex, deleteFontFamily, deleteFon
11
11
setIsOpen ( ! isOpen ) ;
12
12
}
13
13
14
- // handle font famliy that has no font faces, for example a system font
15
- // "-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu..."
16
14
const hasFontFaces = fontFamily . fontFace && fontFamily . fontFace . length ;
17
15
18
16
return (
19
17
< table className = "wp-list-table widefat table-view-list" >
20
- < thead onClick = { toggleIsOpen } >
18
+ < thead >
21
19
< td class = "font-family-head" >
22
20
< div > < strong > { fontFamily . name || fontFamily . fontFamily } </ strong > </ div >
23
21
< div >
@@ -31,44 +29,47 @@ function FontFamily ( { fontFamily, fontFamilyIndex, deleteFontFamily, deleteFon
31
29
>
32
30
{ __ ( 'Remove Font Family' ) }
33
31
</ Button >
34
- { hasFontFaces && (
35
- < Button onClick = { toggleIsOpen } >
36
- < Icon icon = { isOpen ? 'arrow-up-alt2' : 'arrow-down-alt2' } />
37
- </ Button >
38
- ) }
32
+ < Button onClick = { toggleIsOpen } >
33
+ < Icon icon = { isOpen ? 'arrow-up-alt2' : 'arrow-down-alt2' } />
34
+ </ Button >
39
35
</ div >
40
36
</ td >
41
37
</ thead >
42
- { hasFontFaces && (
43
- < tbody className = "font-family-contents" >
44
- < div className = "container" >
45
- < div className = { ` slide ${ isOpen ? "open" : "close" } ` } >
46
- < table className = "wp-list-table widefat striped table-view-list" >
47
- < thead >
48
- < td > { __ ( 'Style' ) } </ td >
49
- < td > { __ ( 'Weight' ) } </ td >
50
- < td > { __ ( 'Preview' ) } </ td >
51
- < td > </ td >
52
- </ thead >
53
- < tbody >
54
- { hasFontFaces && fontFamily . fontFace . map ( ( fontFace , i ) => (
55
- < FontFace
56
- fontFace = { fontFace }
57
- fontFamilyIndex = { fontFamilyIndex }
58
- fontFaceIndex = { i }
59
- demoText = { demoText }
60
- key = { `fontface${ i } ` }
61
- deleteFontFace = {
62
- ( ) => deleteFontFace ( fontFamilyIndex , i )
63
- }
64
- />
65
- ) ) }
66
- </ tbody >
67
- </ table >
68
- </ div >
38
+ < tbody className = "font-family-contents" >
39
+ < div className = "container" >
40
+ < div className = { ` slide ${ isOpen ? "open" : "close" } ` } >
41
+ < table className = "wp-list-table widefat striped table-view-list" >
42
+ < thead >
43
+ < td > { __ ( 'Style' ) } </ td >
44
+ < td > { __ ( 'Weight' ) } </ td >
45
+ < td > { __ ( 'Preview' ) } </ td >
46
+ { hasFontFaces && < td > </ td > }
47
+ </ thead >
48
+ < tbody >
49
+ { hasFontFaces && fontFamily . fontFace . map ( ( fontFace , i ) => (
50
+ < FontFace
51
+ { ...fontFace }
52
+ fontFamilyIndex = { fontFamilyIndex }
53
+ fontFaceIndex = { i }
54
+ demoText = { demoText }
55
+ key = { `fontface${ i } ` }
56
+ deleteFontFace = {
57
+ ( ) => deleteFontFace ( fontFamilyIndex , i )
58
+ }
59
+ />
60
+ ) ) }
61
+ {
62
+ ! hasFontFaces && fontFamily . fontFamily &&
63
+ < FontFace
64
+ { ...fontFamily }
65
+ demoText = { demoText }
66
+ />
67
+ }
68
+ </ tbody >
69
+ </ table >
69
70
</ div >
70
- </ tbody >
71
- ) }
71
+ </ div >
72
+ </ tbody >
72
73
</ table >
73
74
)
74
75
}
0 commit comments