mirror of
https://github.com/aleleba/create-react-component-library.git
synced 2025-09-14 00:56:44 -06:00
PR-500824updating packages.
This commit is contained in:
@ -59,7 +59,23 @@ module.exports = {
|
||||
"paths": {
|
||||
"@Components/*": ["Components/*"]
|
||||
}
|
||||
},
|
||||
propFilter: (prop) => {
|
||||
// Filter out props that might contain Symbol values
|
||||
if (prop.name && typeof prop.name === 'symbol') {
|
||||
return false;
|
||||
}
|
||||
// Filter out React internal props that might cause issues
|
||||
if (prop.name && prop.name.startsWith('$$')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
docs: {
|
||||
autodocs: 'tag',
|
||||
defaultName: 'Docs',
|
||||
}
|
||||
};
|
||||
|
@ -6,5 +6,24 @@ export const parameters = {
|
||||
date: /Date$/,
|
||||
},
|
||||
},
|
||||
docs: {
|
||||
extractArgTypes: (component) => {
|
||||
// Filter out Symbol values to prevent serialization errors
|
||||
const argTypes = {};
|
||||
if (component && component.propTypes) {
|
||||
Object.keys(component.propTypes).forEach(key => {
|
||||
const propType = component.propTypes[key];
|
||||
// Only include non-Symbol values
|
||||
if (typeof propType !== 'symbol') {
|
||||
argTypes[key] = propType;
|
||||
}
|
||||
});
|
||||
}
|
||||
return argTypes;
|
||||
},
|
||||
source: {
|
||||
excludeDecorators: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
export const tags = ["autodocs"];
|
||||
export const tags = ["autodocs"];
|
||||
|
Reference in New Issue
Block a user