From 6c225952468c615d0f0935bb92906d240bcd12b4 Mon Sep 17 00:00:00 2001 From: prsaroha <50709949+prsaroha@users.noreply.github.com> Date: Tue, 16 Mar 2021 21:22:08 +0530 Subject: [PATCH] feat(spacelistmeeting): add props for button tabIndex and className (#787) Co-authored-by: robstax --- react/src/lib/SpaceListMeeting/index.js | 10 ++++++++++ .../tests/__snapshots__/index.spec.js.snap | 2 ++ 2 files changed, 12 insertions(+) diff --git a/react/src/lib/SpaceListMeeting/index.js b/react/src/lib/SpaceListMeeting/index.js index a0ccb51911..162632bf07 100644 --- a/react/src/lib/SpaceListMeeting/index.js +++ b/react/src/lib/SpaceListMeeting/index.js @@ -23,7 +23,9 @@ class SpaceListMeeting extends React.PureComponent { const { attendees, buttonAriaLabel, + buttonClassName, buttonLabel, + buttonTabIndex, childrenLeft, childrenRight, className, @@ -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} /> )} , @@ -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 */ @@ -190,8 +198,10 @@ SpaceListMeeting.propTypes = { SpaceListMeeting.defaultProps = { attendees: [], buttonAriaLabel: null, + buttonClassName: '', buttonLabel: '', buttonOnClick: null, + buttonTabIndex: '0', childrenLeft: null, childrenRight: null, className: '', diff --git a/react/src/lib/SpaceListMeeting/tests/__snapshots__/index.spec.js.snap b/react/src/lib/SpaceListMeeting/tests/__snapshots__/index.spec.js.snap index f1949cd11e..c3a687e819 100644 --- a/react/src/lib/SpaceListMeeting/tests/__snapshots__/index.spec.js.snap +++ b/react/src/lib/SpaceListMeeting/tests/__snapshots__/index.spec.js.snap @@ -6,8 +6,10 @@ ShallowWrapper { Symbol(enzyme.__unrendered__):