alva
alva copied to clipboard
Incorrect import of Ant design library
Importing antd almost works out of the box, once compiled Alva will import all the components but the properties are not correct. I can't get Alva running from source but it seems like it's matching props from incorrect *.d.ts, even from node_modules. Antd is written in TypeScript but with a module layout that may be confusing the analyzer, since each module has it's own directory and index.js.
Is there a way I can tweak the module format to fix the props issue?
This is in v0.9.1. I couldn't find a way to import local libraries in the master version.
To get Antd ready for import:
git clone https://github.com/ant-design/ant-design.git
cd ant-design
npm run compile
Definition from row.d.ts:
export interface RowProps extends React.HTMLAttributes<HTMLDivElement> {
gutter?: number | Partial<Record<Breakpoint, number>>;
type?: 'flex';
align?: (typeof RowAligns)[number];
justify?: (typeof RowJustify)[number];
prefixCls?: string;
}
Properties in Alva:
prefixCls
defaultChecked
defaultValue
suppressContentEditableWarning
suppressHydrationWarning
spellCheck
...
Only prefixCls from the definition is there.
Hey thanks for reporting. Could you provide a bit more details, e.g. screenshots of properties you wouldn't expect?
Added details, this is for v0.9.1.