I use styled components and have a mixin with many default parameters similar to this
`export const myMixins = {
font: (
fontFamily = 'Arial',
weight = 600,
size = '10px',
style = 'normal') => `
font-family: ${ fontFamily };
font-size: ${ size };
font-style: ${ style };
font-weight: ${ weight };
`
};`
I used the default params to avoid passing all of them when it is not needed. But when I try to run this, it only works if I pass all of them, like this: ${ myMixins.font('Roboto', 'bold', '9px', 'normal') }; I also tried assigning null to params, but nothing changed. When I try to run it my IDE stills displays placeholders for all parameters and it won't work otherwise. I also tried to use keywords like $size but could not figure out the proper syntax nor did I find it anywhere on the web. I would like to be able to pass only the specific parameter that I want to change. Any help is much appreciated.