The problem is that there is no way to make a nice looking border around this that doesn’t take up the full row. The button component is nice in that it only forms a border around the button itself - not the full row by default.
I guess I just want to insert an image instead of an icon. Or be able to create a border on a link or flowpanel that hugs the content instead of the entire row.
If you are familiar with CSS, you could try creating a new role for google sign button and adding the image using a ::before element.
You could do something like this:
/* Create a picture inside of the button */
.anvil-role-google-sign>button::before {
content: "";
background-image: url("_/theme/google_logo.png"); /* Url to the picture you want to use */
background-repeat: no-repeat;
position: absolute;
left: 0;
top: auto;
width: 25px;
max-width: 25px;
max-height: 40px;
height: 40px;
margin-left: 5px;
background-size: 20px 20px;
}
/* Move the text to avoid overlap with picture */
.anvil-role-google-sign .button-text {
padding-left: 15px;
}
/* Set hover effect on the button */
.anvil-role-google-sign>button:hover {
background-color: lightgray;
}
I created an example app, you can clone it and look at how it works