Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})(({store}) => {
const bg = boolean('White background', true);
const suffixIcon = boolean('Show suffix icon', false);
const disabled = boolean('Disabled tabs', false);
const draggable = boolean('Enable change order of tabs', false);
const invalid = boolean('Invalid tabs', false);
const maxTabCount = number('Max number of tabs', 4);
const prefix = select('Prefix type', {'tag': prefixType.TAG, 'icon': prefixType.ICON}, prefixType.TAG);
const handleChangeName = (id, name) => {
store.set({
items: store.state.items.map(item => {
return item.id === id ? {
...item,
name: name
} : item;
}),
});
};
const handleRemove = (id) => {
store.set({
items: store.state.items.filter(item => item.id !== id),
});
};