ITADN

Handling components like `NavGroup.Item`

#135Closedhackily 创建于 2024-11-01
H
hackilycommented
I have code that assigns subcomponents to properties of a parent element ``` <NavGroup paddingHorizontal="$300" {...props}> <NavGroup.Item i18nKey="nav.consultation" path="/messages/consultation" > Consultation </NavGroup.Item> <NavGroup.Item i18nKey="nav.quick_assistance" path="/messages/quick-assistance" > Quick Assistance </NavGroup.Item> </NavGroup> ``` How would I exclude `NavGroup.Item` without excluding the parent `NavGroup`? I have this in my exclusions ``` "i18next/no-literal-string": [ "warn", "jsx-components": { exclude: [ "NavGroup.Item", ], }, ``` which has not worked for me - I've tried regex as well `/NavGroup\.Item/` any ideas? Thank you.
关闭于 2024-11-24 0 条评论