JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Buttons › Show hint on smart button using icon?
Tagged: button hint
- This topic has 3 replies, 3 voices, and was last updated 3 years, 3 months ago by
admin.
-
AuthorPosts
-
May 21, 2021 at 11:17 am #101824
davout
MemberAngular 10 app on Windows 10 with Chrome browser
Does the ‘smart-button’ component support hint display?<smart-button class="flat small inlineStateButton" (click)="onSetTaskStatus(rowIndex, actionWaiting)" hint="Change to WAITING"> <fa-icon size="lg" [icon]="iconWaiting" hint="Change to WAITING"></fa-icon> </smart-button> I can't get this to work
May 21, 2021 at 1:49 pm #101825yavordashew
MemberHi davout,
We a componentsmart-tooltip
which in in your case could be very useful.
Also I have created a little code snippet on how to use it withsmart-button
component:
//In your app.compoent.html:<smart-button #button id="button" class="btn btn-1 btn-sep icon-info"> Button </smart-button> <smart-tooltip #tooltip id="tooltip" [selector]="'button'" [arrow]="true" [position]="'right'"> This is a tooltip for smartButton </smart-tooltip>
And in your app.module.ts file:
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { ButtonModule } from 'smart-webcomponents-angular/button'; import { TooltipModule } from 'smart-webcomponents-angular/tooltip'; import { AppComponent } from './app.component'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, ButtonModule, TooltipModule ], bootstrap: [ AppComponent ], entryComponents: [ AppComponent ] }) export class AppModule { }
Also you can check the demos regarding the tooltip:
https://www.htmlelements.com/demos/tooltip/overview/
Let me know if that works for you!
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/May 24, 2021 at 12:12 pm #101832davout
MemberIf I am displaying a button on each row in a table, how do I connect the tool tip to each instance of the button?
May 24, 2021 at 2:44 pm #101838admin
KeymasterHi davout,
If that is your use-case may be then it is better to create a new Angular component which has a Button with Tooltip and use it in your content instead of trying to associate these individually. You can also use the “title” attribute of a Button instead of a tooltip component.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.