File tree Expand file tree Collapse file tree 7 files changed +1942
-1637
lines changed
Expand file tree Collapse file tree 7 files changed +1942
-1637
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : Bleed
3+ description : Use to create a container that applies negative margins. This will allow content to Bleed into the surrounding layout.
4+ category : Structure
5+ keywords :
6+ - layout
7+ status :
8+ value : Alpha
9+ message : This component is in development. There could be breaking changes made to it in a non-major release of Polaris. Please use with caution.
10+ examples :
11+ - fileName : bleed-vertical.tsx
12+ title : Vertical
13+ description : >-
14+ Use to set bleed vertically.
15+ - fileName : bleed-horizontal.tsx
16+ title : Horizontal
17+ description : >-
18+ Use to set bleed horizontally.
19+ - fileName : bleed-specific-direction.tsx
20+ title : Specific direction
21+ description : >-
22+ Use to set bleed in a specific direction
23+ - fileName : bleed-all-directions.tsx
24+ title : All directions
25+ description : >-
26+ Use to set bleed in all directions
27+ ---
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { Bleed , Box , Text } from '@shopify/polaris' ;
3+
4+ import { withPolarisExample } from '../../src/components/PolarisExampleWrapper' ;
5+
6+ const styles = {
7+ background : 'var(--p-background-selected)' ,
8+ borderRadius : 'var(--p-border-radius-05)' ,
9+ border : '1px solid var(--p-surface-dark)' ,
10+ padding : 'var(--p-space-4)' ,
11+ height : 'var(--p-space-12)' ,
12+ opacity : 0.7 ,
13+ } ;
14+
15+ function BleedAllDirectionsExample ( ) {
16+ return (
17+ < div style = { { width : '500px' } } >
18+ < Box background = "surface" border = "base" padding = "4" >
19+ < Bleed spacing = "6" >
20+ < div style = { styles } >
21+ < Text variant = "bodySm" as = "h3" alignment = "center" fontWeight = "bold" >
22+ All directions
23+ </ Text >
24+ </ div >
25+ </ Bleed >
26+ </ Box >
27+ </ div >
28+ ) ;
29+ }
30+
31+ export default withPolarisExample ( BleedAllDirectionsExample ) ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { Bleed , Box , Text } from '@shopify/polaris' ;
3+
4+ import { withPolarisExample } from '../../src/components/PolarisExampleWrapper' ;
5+
6+ const styles = {
7+ background : 'var(--p-background-selected)' ,
8+ borderRadius : 'var(--p-border-radius-05)' ,
9+ border : '1px solid var(--p-surface-dark)' ,
10+ padding : 'var(--p-space-4)' ,
11+ height : 'var(--p-space-12)' ,
12+ opacity : 0.7 ,
13+ } ;
14+
15+ function BleedHorizontalExample ( ) {
16+ return (
17+ < div style = { { width : '500px' } } >
18+ < Box background = "surface" border = "base" padding = "4" >
19+ < Bleed horizontal = "6" >
20+ < div style = { styles } >
21+ < Text variant = "bodySm" as = "h3" alignment = "center" fontWeight = "bold" >
22+ horizontal
23+ </ Text >
24+ </ div >
25+ </ Bleed >
26+ </ Box >
27+ </ div >
28+ ) ;
29+ }
30+
31+ export default withPolarisExample ( BleedHorizontalExample ) ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { Bleed , Box , Text } from '@shopify/polaris' ;
3+
4+ import { withPolarisExample } from '../../src/components/PolarisExampleWrapper' ;
5+
6+ const styles = {
7+ background : 'var(--p-background-selected)' ,
8+ borderRadius : 'var(--p-border-radius-05)' ,
9+ border : '1px solid var(--p-surface-dark)' ,
10+ padding : 'var(--p-space-4)' ,
11+ height : 'var(--p-space-12)' ,
12+ opacity : 0.7 ,
13+ } ;
14+
15+ function BleedSpecificDirectionExample ( ) {
16+ return (
17+ < div style = { { width : '500px' } } >
18+ < Box background = "surface" border = "base" padding = "4" >
19+ < Bleed top = "6" >
20+ < div style = { styles } >
21+ < Text variant = "bodySm" as = "h3" alignment = "center" fontWeight = "bold" >
22+ top
23+ </ Text >
24+ </ div >
25+ </ Bleed >
26+ </ Box >
27+ < br />
28+ < Box background = "surface" border = "base" padding = "4" >
29+ < Bleed right = "6" >
30+ < div style = { styles } >
31+ < Text variant = "bodySm" as = "h3" alignment = "center" fontWeight = "bold" >
32+ right
33+ </ Text >
34+ </ div >
35+ </ Bleed >
36+ </ Box >
37+ < br />
38+ < Box background = "surface" border = "base" padding = "4" >
39+ < Bleed left = "6" >
40+ < div style = { styles } >
41+ < Text variant = "bodySm" as = "h3" alignment = "center" fontWeight = "bold" >
42+ left
43+ </ Text >
44+ </ div >
45+ </ Bleed >
46+ </ Box >
47+ < br />
48+ < Box background = "surface" border = "base" padding = "4" >
49+ < Bleed bottom = "6" >
50+ < div style = { styles } >
51+ < Text variant = "bodySm" as = "h3" alignment = "center" fontWeight = "bold" >
52+ bottom
53+ </ Text >
54+ </ div >
55+ </ Bleed >
56+ </ Box >
57+ < br />
58+ </ div >
59+ ) ;
60+ }
61+
62+ export default withPolarisExample ( BleedSpecificDirectionExample ) ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { Bleed , Box , Text } from '@shopify/polaris' ;
3+
4+ import { withPolarisExample } from '../../src/components/PolarisExampleWrapper' ;
5+
6+ const styles = {
7+ background : 'var(--p-background-selected)' ,
8+ borderRadius : 'var(--p-border-radius-05)' ,
9+ border : '1px solid var(--p-surface-dark)' ,
10+ padding : 'var(--p-space-4)' ,
11+ height : 'var(--p-space-12)' ,
12+ opacity : 0.7 ,
13+ } ;
14+
15+ function BleedVerticalExample ( ) {
16+ return (
17+ < div style = { { width : '500px' } } >
18+ < Box background = "surface" border = "base" padding = "4" >
19+ < Bleed vertical = "6" >
20+ < div style = { styles } >
21+ < Text variant = "bodySm" as = "h3" alignment = "center" fontWeight = "bold" >
22+ vertical
23+ </ Text >
24+ </ div >
25+ </ Bleed >
26+ </ Box >
27+ </ div >
28+ ) ;
29+ }
30+
31+ export default withPolarisExample ( BleedVerticalExample ) ;
You can’t perform that action at this time.
0 commit comments