|
1 | 1 | import { assertType, describe, expectTypeOf, test } from 'vitest';
|
| 2 | +import { component$, type PropsOf, type PublicProps } from '../../../component/component.public'; |
2 | 3 | import { $, type PropFunction } from '../../../qrl/qrl.public';
|
3 |
| -import type { EventHandler, QRLEventHandlerMulti } from './jsx-qwik-attributes'; |
| 4 | +import type { JSX } from '../jsx-runtime'; |
| 5 | +import type { QwikHTMLElements, QwikSVGElements, Size } from './jsx-generated'; |
4 | 6 | import type { FunctionComponent, JSXOutput } from './jsx-node';
|
| 7 | +import type { EventHandler, JSXChildren, QRLEventHandlerMulti } from './jsx-qwik-attributes'; |
5 | 8 | import type { QwikIntrinsicElements } from './jsx-qwik-elements';
|
6 |
| -import type { JSXChildren } from './jsx-qwik-attributes'; |
7 |
| -import { component$, type PropsOf, type PublicProps } from '../../../component/component.public'; |
8 |
| -import type { QwikHTMLElements, QwikSVGElements, Size } from './jsx-generated'; |
9 |
| -import type { JSX } from '../jsx-runtime'; |
10 | 9 |
|
11 | 10 | describe('types', () => {
|
12 | 11 | // Note, these type checks happen at compile time. We don't need to call anything, so we do ()=>()=>. We just need to
|
@@ -327,4 +326,21 @@ describe('types', () => {
|
327 | 326 |
|
328 | 327 | expectTypeOf<PropsOf<17>>().toEqualTypeOf<never>();
|
329 | 328 | });
|
| 329 | + |
| 330 | + test('CSSProperties', () => () => { |
| 331 | + return ( |
| 332 | + <div |
| 333 | + style={{ |
| 334 | + color: 'red', |
| 335 | + backgroundColor: 'blue', |
| 336 | + // Using a CSS variable |
| 337 | + '--my-variable': '10px', |
| 338 | + // Using a number value |
| 339 | + marginTop: 10, |
| 340 | + // Using a string value |
| 341 | + padding: '5px', |
| 342 | + }} |
| 343 | + /> |
| 344 | + ); |
| 345 | + }); |
330 | 346 | });
|
0 commit comments