Merge branch 'master' of github.com:ericfennis/lucide
This commit is contained in:
@@ -3,5 +3,6 @@
|
||||
"id": "939567362549682242",
|
||||
"api": "1.0.0",
|
||||
"ui": "build/ui.html",
|
||||
"main": "build/main.js"
|
||||
"main": "build/main.js",
|
||||
"editorType": ["figma"]
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ export default (iconName, iconNode) => ({
|
||||
'stroke-width': strokeWidth,
|
||||
...data.attrs,
|
||||
},
|
||||
on: data?.on || {}
|
||||
},
|
||||
iconNode.map(([tag, attrs]) => createElement(tag, { attrs })),
|
||||
);
|
||||
|
||||
@@ -41,4 +41,16 @@ describe('Using lucide icon components', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.attributes('style')).toContain('position: absolute')
|
||||
});
|
||||
|
||||
it('should call the onClick event', () => {
|
||||
const onClick = jest.fn()
|
||||
const wrapper = mount(Smile, {
|
||||
listeners: {
|
||||
click: onClick
|
||||
}
|
||||
})
|
||||
|
||||
wrapper.trigger('click')
|
||||
expect(onClick).toHaveBeenCalled()
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user