Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Button to Typescript #2984

Merged
merged 12 commits into from Aug 22, 2021
2 changes: 1 addition & 1 deletion js/src/common/components/Button.tsx
Expand Up @@ -66,7 +66,7 @@ export interface IButtonAttrs extends ComponentAttrs {
* be used to represent any generic clickable control, like a menu item. Common
* styles can be applied by providing `className="Button"` to the Button component.
*/
export default class Button extends Component<IButtonAttrs> {
export default class Button<CustomAttrs extends Record<string, unknown> = {}> extends Component<IButtonAttrs & CustomAttrs> {
davwheat marked this conversation as resolved.
Show resolved Hide resolved
view(vnode: Mithril.Vnode<IButtonAttrs, never>) {
let { type, title, 'aria-label': ariaLabel, icon: iconName, disabled, loading, className, class: _class, ...attrs } = this.attrs;

Expand Down