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

feat(spacelistmeeting): add props for button tabIndex and className #787

Merged
merged 5 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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