1
1
import { HTMLAttributes , useContext } from 'react'
2
- import { useUniqueId , Spacing , Glow } from '@edgeandnode/components'
2
+ import { Spacing , Opacity , buildShadow , useUniqueId } from '@edgeandnode/components'
3
3
import classnames from 'classnames'
4
4
import { useInView } from 'react-intersection-observer'
5
5
import { useDebounce } from 'react-use'
@@ -34,7 +34,7 @@ export const Heading = ({ level, id, className, children, ...props }: HeadingPro
34
34
innerRef = { ref }
35
35
as = { `h${ level } ` }
36
36
id = { id }
37
- weight = "SemiBold "
37
+ weight = "Semibold "
38
38
color = "White"
39
39
className = { classnames ( rootClass , className ) }
40
40
sx = { { whiteSpace : 'nowrap' } }
@@ -45,8 +45,8 @@ export const Heading = ({ level, id, className, children, ...props }: HeadingPro
45
45
< span
46
46
sx = { {
47
47
ml : '0.35em' ,
48
- opacity : 0 ,
49
- [ `.${ rootClass } :hover &` ] : { opacity : 1 } ,
48
+ opacity : Opacity [ '0%' ] ,
49
+ [ `.${ rootClass } :hover &` ] : { opacity : Opacity [ '100%' ] } ,
50
50
transition : 'opacity 200ms' ,
51
51
} }
52
52
>
@@ -58,7 +58,7 @@ export const Heading = ({ level, id, className, children, ...props }: HeadingPro
58
58
}
59
59
60
60
export const H1 = ( props : HeadingSpecificProps ) => {
61
- return < Heading level = { 1 } size = "48px" sx = { { mb : Spacing . L , textShadow : Glow . L } } { ...props } />
61
+ return < Heading level = { 1 } size = "48px" sx = { { mb : Spacing . L , textShadow : buildShadow ( 'L' ) } } { ...props } />
62
62
}
63
63
64
64
export const H2 = ( props : HeadingSpecificProps ) => {
@@ -69,25 +69,33 @@ export const H2 = (props: HeadingSpecificProps) => {
69
69
sx = { {
70
70
mt : Spacing . XL_XXL ,
71
71
mb : Spacing . L_XL ,
72
- textShadow : Glow . M ,
72
+ textShadow : buildShadow ( 'M' ) ,
73
73
} }
74
74
{ ...props }
75
75
/>
76
76
)
77
77
}
78
78
79
79
export const H3 = ( props : HeadingSpecificProps ) => {
80
- return < Heading level = { 3 } size = "24px" sx = { { mt : Spacing . XL , mb : Spacing . L_XL , textShadow : Glow . M } } { ...props } />
80
+ return (
81
+ < Heading level = { 3 } size = "24px" sx = { { mt : Spacing . XL , mb : Spacing . L_XL , textShadow : buildShadow ( 'M' ) } } { ...props } />
82
+ )
81
83
}
82
84
83
85
export const H4 = ( props : HeadingSpecificProps ) => {
84
- return < Heading level = { 4 } size = "20px" sx = { { mt : Spacing . XL , mb : Spacing . L , textShadow : Glow . S } } { ...props } />
86
+ return (
87
+ < Heading level = { 4 } size = "20px" sx = { { mt : Spacing . XL , mb : Spacing . L , textShadow : buildShadow ( 'S' ) } } { ...props } />
88
+ )
85
89
}
86
90
87
91
export const H5 = ( props : HeadingSpecificProps ) => {
88
- return < Heading level = { 5 } size = "18px" sx = { { mt : Spacing . XL , mb : Spacing . L , textShadow : Glow . S } } { ...props } />
92
+ return (
93
+ < Heading level = { 5 } size = "18px" sx = { { mt : Spacing . XL , mb : Spacing . L , textShadow : buildShadow ( 'S' ) } } { ...props } />
94
+ )
89
95
}
90
96
91
97
export const H6 = ( props : HeadingSpecificProps ) => {
92
- return < Heading level = { 6 } size = "16px" sx = { { mt : Spacing . XL , mb : Spacing . L , textShadow : Glow . S } } { ...props } />
98
+ return (
99
+ < Heading level = { 6 } size = "16px" sx = { { mt : Spacing . XL , mb : Spacing . L , textShadow : buildShadow ( 'S' ) } } { ...props } />
100
+ )
93
101
}
0 commit comments