When I specify an inline style in TSX like
<ModalHeading id="modal-1-heading" style={{"padding":"0px"}}>Mailing Address</ModalHeading>
everything functions correctly. However, if I attempt to use the padding-top
variation
<ModalHeading id="modal-1-heading" style={{"padding-top":"0px"}}>Mailing Address</ModalHeading>
An error occurs:
Type '{ "padding-top": string; }' is not assignable to type 'Properties<string | number, string & {}>'.
Object literal may only specify known properties, and '"padding-top"' does not exist in type 'Properties<string | number, string & {}>'.ts(2322)
https://i.sstatic.net/4pJG6.jpg
Sometimes similar issues arise with other styles like background-color
.