Skip to content
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

Text/html button #217

Merged
merged 6 commits into from Mar 18, 2018
Merged

Text/html button #217

merged 6 commits into from Mar 18, 2018

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Jan 16, 2018

Add text and html options

html is a boolean attribute to allow the text to be inserted as html

I also made the icon optional to allow for just text buttons

fixes #215
fixes cakecatz/flex-toolbar#111
fixes cakecatz/flex-toolbar#120

  // Adding text button
  toolBar.addButton({
    text: 'hello',
    callback: 'application:about'
  });

  // Text buttons can also have an icon
  toolBar.addButton({
    icon: 'octoface',
    text: 'hello',
    callback: 'application:about'
  });

  // Text buttons can be html
  toolBar.addButton({
    icon: 'octoface',
    text: '<b>BIG</b> button',
    html: true,
    callback: 'application:about'
  });

@UziTech
Copy link
Member Author

UziTech commented Jan 18, 2018

looks like travis failed because macos build got canceled. @suda can you restart the macos builds?

@UziTech
Copy link
Member Author

UziTech commented Feb 14, 2018

@suda any feedback on this?

@UziTech
Copy link
Member Author

UziTech commented Mar 9, 2018

@suda I was able to implement this in cakecatz/flex-toolbar#125 but I had to use !important in the css to override the width. So it would be a lot better to implement it in tool-bar so I could remove that style hack.

@suda
Copy link
Collaborator

suda commented Mar 18, 2018

Oh sorry for keep you waiting! Merging it now :)

@suda suda merged commit 578b1a4 into atom-community:master Mar 18, 2018
@edjubuh
Copy link

edjubuh commented Mar 29, 2018

Does this close #197?

@UziTech
Copy link
Member Author

UziTech commented Mar 29, 2018

@edjubuh yes, you can add svg elements with:

toolbar.addbutton({
	tooltip: 'Cherry Pick',
	text: '<svg ...',
	html: true,
	callback: 'git-plus:cherry-pick'
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add text, html options Adding custom icon Add support for string
3 participants