File tree Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -519,13 +519,8 @@ function createProperties(state, ancestors) {
519519 if ( alignValue ) {
520520 // Assume style is an object.
521521 const style = /** @type {Style } */ ( props . style || ( props . style = { } ) )
522- const cssField = 'text-align'
523522 style [
524- state . stylePropertyNameCase === 'css'
525- ? // Note: test this when Solid doesn’t want to merge my upcoming PR.
526- /* c8 ignore next */
527- transformStyleToCssCasing ( cssField )
528- : cssField
523+ state . stylePropertyNameCase === 'css' ? 'text-align' : 'textAlign'
529524 ] = alignValue
530525 }
531526 }
Original file line number Diff line number Diff line change @@ -628,7 +628,7 @@ test('react specific: `align` to `style`', async function (t) {
628628 )
629629
630630 await t . test (
631- "should suppoort `tableCellAlignToStyle` w/ `stylePropertyNameCase: 'css'`" ,
631+ "should support `tableCellAlignToStyle` w/ `stylePropertyNameCase: 'css'`" ,
632632 async function ( ) {
633633 /** @type {unknown } */
634634 let foundProps
@@ -652,4 +652,30 @@ test('react specific: `align` to `style`', async function (t) {
652652 } )
653653 }
654654 )
655+
656+ await t . test (
657+ "should support `tableCellAlignToStyle` w/ `stylePropertyNameCase: 'dom'`" ,
658+ async function ( ) {
659+ /** @type {unknown } */
660+ let foundProps
661+
662+ assert . equal (
663+ renderToStaticMarkup (
664+ toJsxRuntime ( h ( 'td' , { align : 'center' } ) , {
665+ ...production ,
666+ jsx ( type , props ) {
667+ foundProps = props
668+ return production . jsx ( type , { } )
669+ } ,
670+ stylePropertyNameCase : 'dom'
671+ } )
672+ ) ,
673+ '<td></td>'
674+ )
675+
676+ assert . deepEqual ( foundProps , {
677+ style : { textAlign : 'center' }
678+ } )
679+ }
680+ )
655681} )
You can’t perform that action at this time.
0 commit comments