File tree 4 files changed +58
-2
lines changed
@adobe/spectrum-css-temp/components/rule
4 files changed +58
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ governing permissions and limitations under the License.
19
19
border : none;
20
20
border-width : var (--spectrum-rule-medium-height );
21
21
border-radius : var (--spectrum-rule-medium-height );
22
+
23
+ /* hr elements are given a default margin, reset it so that flex can work */
24
+ margin : 0px ;
25
+ margin-inline-start : 0px ;
26
+ margin-inline-end : 0px ;
27
+ align-self : stretch;
22
28
}
23
29
24
30
.spectrum-Rule--large {
@@ -48,6 +54,7 @@ governing permissions and limitations under the License.
48
54
}
49
55
50
56
.spectrum-Rule--vertical {
57
+ height : auto;
51
58
/* expected usage, people need to set height 100% if they aren't using flex on the container
52
59
* if they *ARE* using flex, then they need to either have align-items stretch OR align-self stretch
53
60
*/
Original file line number Diff line number Diff line change @@ -2,9 +2,8 @@ import {Layout} from '@react-spectrum/docs';
2
2
export default Layout ;
3
3
4
4
import docs from ' docs:@react-spectrum/button' ;
5
- import {PropTable } from ' @react-spectrum/docs' ;
5
+ import {HeaderInfo , PropTable } from ' @react-spectrum/docs' ;
6
6
import packageData from ' ../package.json' ;
7
- import {HeaderInfo } from ' @react-spectrum/docs' ;
8
7
9
8
``` jsx import
10
9
import {Button } from ' @react-spectrum/button' ;
Original file line number Diff line number Diff line change
1
+ import {Layout } from ' @react-spectrum/docs' ;
2
+ export default Layout ;
3
+
4
+ import docs from ' docs:@react-spectrum/divider' ;
5
+ import {HeaderInfo , PropTable } from ' @react-spectrum/docs' ;
6
+ import packageData from ' ../package.json' ;
7
+
8
+ ``` jsx import
9
+ import {Divider } from ' @react-spectrum/divider' ;
10
+ import {Flex } from ' @react-spectrum/layout' ;
11
+ ```
12
+
13
+ # Divider
14
+
15
+ <p >{ docs .exports .Divider .description } </p >
16
+
17
+ <HeaderInfo
18
+ packageData = { packageData }
19
+ componentNames = { [' Divider' ]}
20
+ sourceData = { [
21
+ {type: ' Spectrum' , url: ' https://spectrum.adobe.com/page/rule/' }
22
+ ]} />
23
+
24
+ ## Example
25
+
26
+ ### Horizontal
27
+
28
+ Horizontal Dividers can be used as is because of how CSS Layout works. They may also be used in Flex and Grid containers.
29
+ ``` tsx example
30
+ Content above
31
+ <Divider marginTop = " 10px" marginBottom = " 10px" />
32
+ Content below
33
+ ```
34
+
35
+ ### Vertical
36
+
37
+ It is recommended to only use vertical Dividers in Flex or Grid containers. CSS Layout otherwise makes displaying a vertical Divider very difficult.
38
+ ``` tsx example
39
+ <Flex >
40
+ Content left
41
+ <Divider orientation = " vertical" marginLeft = " 10px" marginRight = " 10px" />
42
+ Content right
43
+ </Flex >
44
+ ```
45
+
46
+ ## Props
47
+
48
+ <PropTable component = { docs .exports .Divider } links = { docs .links } />
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ export const baseStyleProps: StyleHandlers = {
28
28
maxWidth : [ 'maxWidth' , dimensionValue ] ,
29
29
maxHeight : [ 'maxHeight' , dimensionValue ] ,
30
30
isHidden : [ 'display' , hiddenValue ] ,
31
+ alignSelf : [ 'alignSelf' , passthroughStyle ] ,
32
+ justifySelf : [ 'justifySelf' , passthroughStyle ] ,
31
33
position : [ 'position' , anyValue ] ,
32
34
zIndex : [ 'zIndex' , anyValue ] ,
33
35
top : [ 'top' , dimensionValue ] ,
You can’t perform that action at this time.
0 commit comments