import { CommonModule } from '@angular/common';
import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'storybook-button',
standalone: true,
imports: [CommonModule],
template: ` `,
// styleUrls: ['./button.css'],
})
export class ButtonComponent {
/** Is this the principal call to action on the page? */
@Input()
primary = false;
/** What background color to use */
@Input()
backgroundColor?: string;
/** How large should the button be? */
@Input()
size: 'small' | 'medium' | 'large' = 'medium';
/**
* Button contents
*
* @required
*/
@Input()
label = 'Button';
/** Optional click handler */
@Output()
onClick = new EventEmitter();
public get classes(): string[] {
const mode = this.primary ? 'storybook-button--primary' : 'storybook-button--secondary';
return ['storybook-button', `storybook-button--${this.size}`, mode];
}
}