I am working on React project and WebStorm is my IDE but I have noticed than whenever I want to write some props for my components I am not getting properly intellisense. I am using Create- React-App
and React-CSS-Modules
as styling library.
Checkbox component:
const CheckboxWrapperInner = ({
isSelected,
customStyleName = 'checkbox',
hex6Color = '#221ecc',
additionalSelectedStyles = {
borderColor: hex6Color || '#221ecc',
},
additionalUnselectedStyles = {
backgroundColor: 'transparent',
},
label,
onClick = () => {},
})
// ... some code
const CheckboxInner = ({...rest}) => {
return <CheckboxWrapper customStyleName="checkbox" {...rest}></CheckboxWrapper>;
};
const CheckboxWrapper = CSSModules(CheckboxWrapperInner, style, {
allowMultiple: true,
handleNotFoundStyleName: 'ignore',
});
export const Checkbox = CSSModules(CheckboxInner, style, {allowMultiple: true});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.