Skip to content

Commit 9def299

Browse files
author
Hector Arce De Las Heras
committed
Add role prop to Button component
1 parent f5ddcbc commit 9def299

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/components/button/buttonStandAlone.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const ButtonStandAloneComponent = (
7070
disabled={disabled}
7171
form={props.form}
7272
minWidth={props.minWidth}
73+
role={props.role}
7374
tabIndex={props.tabIndex}
7475
type={props.type}
7576
onClick={props.onClick}

src/components/button/types/button.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22

33
import { IElementOrIcon } from '@/components/elementOrIcon';
44
import { ILoader } from '@/components/loader/types';
5-
import { CustomTokenTypes } from '@/types';
5+
import { CustomTokenTypes, ROLES } from '@/types';
66

77
import type { IconPositionType } from './buttonIconPosition';
88
import type { ButtonSizePropsType, ButtonStateKeyOfType } from './buttonTheme';
@@ -61,6 +61,7 @@ export interface IButtonStandAlone
6161
onClick?: React.MouseEventHandler<HTMLButtonElement>;
6262
icon?: IElementOrIcon;
6363
form?: string;
64+
role?: string | ROLES;
6465
}
6566

6667
/**

0 commit comments

Comments
 (0)