ad-button-slide
v0.0.7
Published
[website](https://adessilly.github.io/ad-button-slide/)
Downloads
3
Readme
AdButtonSlide
Button Slide : show simple icon, on hover : show icon + text
Using ad-button-slide in a project
- Install the library :
npm i ad-button-slide
- Import the module :
import { AdButtonSlideModule } from 'ad-button-slide';
@NgModule({
imports: [ ..., AdButtonSlideModule ], ...
- (optional) import an icon library like fontawesome (
npm i @fortawesome/fontawesome-free
) - Play with the component :-)
<ad-button-slide icon="fas fa-trash" label="Delete this" background="red"></ad-button-slide>
Properties
ad-button-slide
- (AdButtonSlideComponent
) - button slide component object.
Parameters supported by this object:
icon
: string; - icon class, eg. 'fa fa-trash'label
: string; - label displayed on hoverbackground
: string = '#aaa'; - css background colorforeground
: string = 'white'; - css font colorbackgroundOver
: string = null; - css background color when mouseOver, if no value given : backgroundOver = backgroundforegroundOver
: string = null; - css font color when mouseOver, if no value given : foregroundOver = foregroundmini
: boolean = false; - boolean to make the button tiny
Example
Test library
clone this project and run 'npm i && npm start'
License
MIT License
Author
Adrien Dessilly