9 lines
214 B
TypeScript
9 lines
214 B
TypeScript
export interface ButtonProps {
|
|
label: string;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export function createButton(props: ButtonProps): string {
|
|
return `<button ${props.disabled ? 'disabled' : ''}>${props.label}</button>`;
|
|
}
|