Skip to content

Commit

Permalink
feat(spacelistmeeting): add props for button tabIndex and className (#…
Browse files Browse the repository at this point in the history
…787)

Co-authored-by: robstax <rob.stachofsky@gmail.com>
  • Loading branch information
prsaroha and robstax authored Mar 16, 2021
1 parent 93aa859 commit 6c22595
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions react/src/lib/SpaceListMeeting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class SpaceListMeeting extends React.PureComponent {
const {
attendees,
buttonAriaLabel,
buttonClassName,
buttonLabel,
buttonTabIndex,
childrenLeft,
childrenRight,
className,
Expand Down Expand Up @@ -119,8 +121,10 @@ class SpaceListMeeting extends React.PureComponent {
color={isMessagingOnlyShare ? 'blue' : 'green'}
ariaLabel={buttonAriaLabel ? buttonAriaLabel : buttonLabel}
children={buttonLabel}
className={buttonClassName}
onClick={this.handleButtonClick}
size={28}
tabIndex={buttonTabIndex}
/>
)}
</ListItemSection>,
Expand Down Expand Up @@ -157,10 +161,14 @@ SpaceListMeeting.propTypes = {
),
/** @prop Aria label string for button | buttonLabel */
buttonAriaLabel: PropTypes.string,
/** @prop Optionsl HTML Class string for button | '' */
buttonClassName: PropTypes.string,
/** @prop Label string for button | '' */
buttonLabel: PropTypes.string,
/** @prop Callback function invoked when user clicks on button | null */
buttonOnClick: PropTypes.func,
/** @prop Tab index for button | '0' */
buttonTabIndex: PropTypes.string,
/** @prop Children nodes to render for left section | null */
childrenLeft: PropTypes.node,
/** @prop Children nodes to render for right section | null */
Expand Down Expand Up @@ -190,8 +198,10 @@ SpaceListMeeting.propTypes = {
SpaceListMeeting.defaultProps = {
attendees: [],
buttonAriaLabel: null,
buttonClassName: '',
buttonLabel: '',
buttonOnClick: null,
buttonTabIndex: '0',
childrenLeft: null,
childrenRight: null,
className: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ ShallowWrapper {
Symbol(enzyme.__unrendered__): <SpaceListMeeting
attendees={Array []}
buttonAriaLabel={null}
buttonClassName=""
buttonLabel=""
buttonOnClick={null}
buttonTabIndex="0"
childrenLeft={null}
childrenRight={null}
className=""
Expand Down

0 comments on commit 6c22595

Please sign in to comment.