Problem : So I'm using this npm package react-qr-scanner to scan QR codes in my PWA. Now this is a react based package. The react component(just an example) is like:
export function QrReader (props) {
const videoPreviewStyle = {
width : 300,
//bunch of other styles
}
return (
<>
<Section style={ videoPreviewStyle }></Section>
</>
);
}
Okay so the 'Section' shown above has element-level css styles applied from the videoPreviewStyle object. Now what I wanna do is customize this section. Now the only way I thought is to actually make changes to the npm installed file(in node_modules folder). I tried it, but didn't work(I don't know why, so if you could answer why that'd be awesome). But I also read that whenever I reinstall the package, that would overwrite my changes, obviously(and I don't want that, so that is out of the question). So how exactly would I achieve this? Does anyone have a solution?