mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
Update button component to use label
This commit is contained in:
parent
45231e4d2f
commit
3492b4c423
@ -1,8 +1,7 @@
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
// Needs to be a different name to the CLI template button as they have a
|
||||
// subtly different interface [label vs children] (for compodoc)
|
||||
// Needs to be a different name to the CLI template button
|
||||
selector: 'storybook-framework-button',
|
||||
template: ` <button
|
||||
type="button"
|
||||
@ -10,7 +9,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
[ngClass]="classes"
|
||||
[ngStyle]="{ 'background-color': backgroundColor }"
|
||||
>
|
||||
{{ children }}
|
||||
{{ label }}
|
||||
</button>`,
|
||||
styleUrls: ['./button.css'],
|
||||
})
|
||||
@ -39,7 +38,7 @@ export default class FrameworkButtonComponent {
|
||||
* @required
|
||||
*/
|
||||
@Input()
|
||||
children = 'Button';
|
||||
label = 'Button';
|
||||
|
||||
/**
|
||||
* Optional click handler
|
||||
|
Loading…
x
Reference in New Issue
Block a user