File tree 2 files changed +28
-7
lines changed
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) {
519
519
if ( alignValue ) {
520
520
// Assume style is an object.
521
521
const style = /** @type {Style } */ ( props . style || ( props . style = { } ) )
522
- const cssField = 'text-align'
523
522
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'
529
524
] = alignValue
530
525
}
531
526
}
Original file line number Diff line number Diff line change @@ -628,7 +628,7 @@ test('react specific: `align` to `style`', async function (t) {
628
628
)
629
629
630
630
await t . test (
631
- "should suppoort `tableCellAlignToStyle` w/ `stylePropertyNameCase: 'css'`" ,
631
+ "should support `tableCellAlignToStyle` w/ `stylePropertyNameCase: 'css'`" ,
632
632
async function ( ) {
633
633
/** @type {unknown } */
634
634
let foundProps
@@ -652,4 +652,30 @@ test('react specific: `align` to `style`', async function (t) {
652
652
} )
653
653
}
654
654
)
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
+ )
655
681
} )
You can’t perform that action at this time.
0 commit comments