11import { HTMLAttributes , useContext } from 'react'
2- import { useUniqueId , Spacing , Glow } from '@edgeandnode/components'
2+ import { Spacing , Opacity , buildShadow , useUniqueId } from '@edgeandnode/components'
33import classnames from 'classnames'
44import { useInView } from 'react-intersection-observer'
55import { useDebounce } from 'react-use'
@@ -34,7 +34,7 @@ export const Heading = ({ level, id, className, children, ...props }: HeadingPro
3434 innerRef = { ref }
3535 as = { `h${ level } ` }
3636 id = { id }
37- weight = "SemiBold "
37+ weight = "Semibold "
3838 color = "White"
3939 className = { classnames ( rootClass , className ) }
4040 sx = { { whiteSpace : 'nowrap' } }
@@ -45,8 +45,8 @@ export const Heading = ({ level, id, className, children, ...props }: HeadingPro
4545 < span
4646 sx = { {
4747 ml : '0.35em' ,
48- opacity : 0 ,
49- [ `.${ rootClass } :hover &` ] : { opacity : 1 } ,
48+ opacity : Opacity [ '0%' ] ,
49+ [ `.${ rootClass } :hover &` ] : { opacity : Opacity [ '100%' ] } ,
5050 transition : 'opacity 200ms' ,
5151 } }
5252 >
@@ -58,7 +58,7 @@ export const Heading = ({ level, id, className, children, ...props }: HeadingPro
5858}
5959
6060export 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 } />
6262}
6363
6464export const H2 = ( props : HeadingSpecificProps ) => {
@@ -69,25 +69,33 @@ export const H2 = (props: HeadingSpecificProps) => {
6969 sx = { {
7070 mt : Spacing . XL_XXL ,
7171 mb : Spacing . L_XL ,
72- textShadow : Glow . M ,
72+ textShadow : buildShadow ( 'M' ) ,
7373 } }
7474 { ...props }
7575 />
7676 )
7777}
7878
7979export 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+ )
8183}
8284
8385export 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+ )
8589}
8690
8791export 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+ )
8995}
9096
9197export 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+ )
93101}
0 commit comments