[SalesForce] Lightning Component Quick Action buttons

I am attempting to create a Lightning Component Quick Action where the user can select between two options when converting a lead. When I initially do this with buttons, it looks awkward along with the cancel button (and excuse the POC-quality styling):

When I remove the header and add a heading, it looks much better.

Now on desktop, the [x] in the corner allows the user to easily exit out, while on Android, the user can press the phone's back button. The issue now arises on iOS, where the user has no way of leaving the quick action without adding a cancel button.

So, I'm aware I can just add a cancel button to the no-header version, but there are a couple ideas I would like to try if they are possible, and I haven't been able to find comprehensive documentation on Lightning Component quick actions.

First, can you add buttons alongside "Cancel" when creating a quick action with a header? I know in mobile, the cancel button appears in the header on the top left, so I don't know how mobile would handle those additional buttons.

Second, is there a way to conditionally display the header based on certain criteria (for example, whether the user is accessing the page via mobile)? Since the header is handled with the "implements" attribute, I'd expect not.

Best Answer

For your first question, unfortunately it's not possible. You can still use force:lightningQuickActionWithoutHeader and recreate the look & feel yourself using slds.

For the second one, you can make use of $User.UIThemeDisplayed to know which theme is used by your user (like Salesforce1 or Lightning Experience) and adapt your code to display your header or not. Again, you'll have to use the Quick Action without header and rewrite it yourself.