-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding button to the tool bars #244
Labels
Comments
You can add it as new Example (sorry for formatting): let newCapabilityHandler = () => console.log('click');
let newCapability = {
id: 'my-custom-button',
icon: { svg: 'hello' },
label: 'My Custom Button',
shouldBeAvailable: () => true,
availableInContexts: ['toolbar'],
handler: newCapabilityHandler
};
<FileNavigator
...
capabilities={{
...connectorNodeV1.capabilities,
newCapability
}}
/> I think it should be enough. If not, you can provide some use case and we'll try to solve this issue together. |
wow this looks nice. :-) I'll give it try |
Tried code above) Sorry, its not working. Please wait for solution ~30m |
kvolkovich-sc
pushed a commit
that referenced
this issue
Dec 14, 2018
I added an example (black bold circle). capabilities={(apiOptions, actions) => ([
...(window.connectors.nodeV1.capabilities(apiOptions, actions)),
({
id: 'custom-button',
icon: {
svg: '<svg viewBox="0 0 120 120" version="1.1"><circle cx="60" cy="60" r="50"></circle></svg>'
},
label: 'Custom Button',
shouldBeAvailable: () => true,
availableInContexts: ['toolbar'],
handler: () => alert('Custom button click')
})
])} |
that worked ! Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to add custom buttons to the toolbar?
The text was updated successfully, but these errors were encountered: