JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Buttons Show hint on smart button using icon?

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #101824
    davout
    Member

    Angular 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
    #101825
    yavordashew
    Member

    Hi davout,
    We a component smart-tooltip which in in your case could be very useful.
    Also I have created a little code snippet on how to use it with smart-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/

    #101832
    davout
    Member

    If I am displaying a button on each row in a table,   how do I connect the tool tip to each instance of the button?

    #101838
    admin
    Keymaster

    Hi 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/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.