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

Image button #94

Merged
merged 4 commits into from Dec 29, 2016

Conversation

Projects
None yet
2 participants
@wajahatch888
Contributor

wajahatch888 commented Dec 27, 2016

I was not sure about name so i used imagebutton. Image button can be created with below json

{
                  "type": "button",
                  "url": "http://i.imgur.com/KUJPgGV.png",
                  "style": {
                    "width": "50",
                    "height": "50",
                    "background": "#00ff00"
                  },
                  "action": {
                    "type": "$util.alert",
                    "options": {
                      "title": "Good job!",
                      "description": "You know how to press a button!"
                    }
                  }
                }
@gliechtenstein

This comment has been minimized.

Contributor

gliechtenstein commented Dec 27, 2016

Hmm I was actually thinking maybe we can use the same button component (JasonButtonComponent) but instead of text use url and Jasonette will implicitly recognize that it's an image type button instead of label type, just from that variation.

The reason is because I think it's good to not introduce new tags as much as possible, for the sake of making it easier to remember these tag usage. Also I've seen people try to use it exactly this way thinking that it should just work.

I should have discussed this with you beforehand, sorry about the hassle! Also please let me know if you ran into anything that makes it hard to implement it this way.

@gliechtenstein gliechtenstein merged commit 311b6f7 into Jasonette:develop Dec 29, 2016

@gliechtenstein

This comment has been minimized.

Contributor

gliechtenstein commented Dec 29, 2016

Merged, thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment