mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(compiler): add skin project compilation
This commit is contained in:
@@ -69,12 +69,15 @@ const Gesture = createComponent(
|
||||
describe('constrained JSX', () => {
|
||||
it('accepts a single component', () => {
|
||||
void (<PlayButton className="x" />);
|
||||
void (<PlayButton className={['x', undefined, false, ['y']]} />);
|
||||
void (<PlayButton key="play" />);
|
||||
});
|
||||
|
||||
it('rejects invalid props on a single component', () => {
|
||||
// @ts-expect-error - className must be a string
|
||||
// @ts-expect-error - className must be a string or className array
|
||||
void (<PlayButton className={5} />);
|
||||
// @ts-expect-error - className array values must be className-compatible
|
||||
void (<PlayButton className={['x', 5]} />);
|
||||
// @ts-expect-error - id is a target-specific attr, not a core JSX prop
|
||||
void (<PlayButton id="play" />);
|
||||
// @ts-expect-error - hidden is a target-specific attr, not a core JSX prop
|
||||
|
||||
@@ -23,8 +23,10 @@ export interface ComponentNode {
|
||||
readonly key: string | number | null;
|
||||
}
|
||||
|
||||
export type ClassNameValue = string | false | null | undefined | readonly ClassNameValue[];
|
||||
|
||||
export interface BaseProps {
|
||||
className?: string | undefined;
|
||||
className?: ClassNameValue;
|
||||
children?: unknown;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user