File tree Expand file tree Collapse file tree 3 files changed +27
-25
lines changed
client/dashboard/components/action-list Expand file tree Collapse file tree 3 files changed +27
-25
lines changed Original file line number Diff line number Diff line change 5
5
padding : $grid-unit-20 0 ;
6
6
border-bottom : 1px solid $gray-100 ;
7
7
8
- & :first-child {
9
- padding-top : $grid-unit-10 ;
10
- }
11
-
12
8
& :last-child {
13
- padding-bottom : $grid-unit-10 ;
14
9
border-bottom : none ;
15
10
}
16
11
Original file line number Diff line number Diff line change 2
2
__experimentalVStack as VStack ,
3
3
__experimentalText as Text ,
4
4
Card ,
5
+ CardBody ,
5
6
} from '@wordpress/components' ;
6
7
import { forwardRef } from 'react' ;
7
8
import ActionItem from './action-item' ;
@@ -14,21 +15,25 @@ function UnforwardedActionList(
14
15
) {
15
16
return (
16
17
< Card className = "action-list" ref = { ref } >
17
- { ( title || description ) && (
18
- < VStack className = "action-list__heading" spacing = { 2 } >
19
- { title && (
20
- < Text size = "15px" weight = { 500 } lineHeight = "20px" >
21
- { title }
22
- </ Text >
23
- ) }
24
- { description && (
25
- < Text variant = "muted" lineHeight = "20px" >
26
- { description }
27
- </ Text >
28
- ) }
18
+ < CardBody >
19
+ { ( title || description ) && (
20
+ < VStack className = "action-list__heading" spacing = { 2 } >
21
+ { title && (
22
+ < Text size = "15px" weight = { 500 } lineHeight = "20px" >
23
+ { title }
24
+ </ Text >
25
+ ) }
26
+ { description && (
27
+ < Text variant = "muted" lineHeight = "20px" >
28
+ { description }
29
+ </ Text >
30
+ ) }
31
+ </ VStack >
32
+ ) }
33
+ < VStack className = "action-list__actions" spacing = { 0 } >
34
+ { children }
29
35
</ VStack >
30
- ) }
31
- < VStack spacing = { 0 } > { children } </ VStack >
36
+ </ CardBody >
32
37
</ Card >
33
38
) ;
34
39
}
Original file line number Diff line number Diff line change 2
2
@import " @wordpress/base-styles/variables" ;
3
3
4
4
.action-list {
5
- padding : $grid-unit-10 $grid-unit-30 ;
6
-
7
- & :has (.action-list__heading ) {
8
- padding : $grid-unit-20 $grid-unit-30 ;
9
- }
10
-
11
5
.action-list__heading {
12
6
padding-top : $grid-unit-10 ;
13
7
padding-bottom : $grid-unit-15 ;
14
8
}
9
+
10
+ .action-list__heading ~ .action-list__actions {
11
+ margin : - $grid-unit-10 0 ;
12
+ }
13
+
14
+ .action-list__actions {
15
+ margin : - $grid-unit-20 0 ;
16
+ }
15
17
}
You can’t perform that action at this time.
0 commit comments