I have a helper file (object) called icons.ts
export default {
'One': { Key: Foo.Bar, Color: '#eeeeaa' },
'Two': { Key: Foo.Bar, Color: '#aaeeee' },
'Three': { Key: Foo.Bar, Color: '#ffaaaa'},
};
I am importing it in multiple React components:
import Icons from 'app/helpers/icons';
What is a clean, intuitive way to create another helper based on above one, but without the key: 'Three': { Key: Foo.Bar, Color: '#ffaaaa'},
and which I can import in another component something like:
import IconsTwo from 'app/helpers/icons';
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment