Skip to content

Commit

Permalink
review I
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Jun 5, 2019
1 parent 2e51ae0 commit db091eb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 29 deletions.
13 changes: 0 additions & 13 deletions package-lock.json

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
"react-vis": "1.10.2",
"resize-observer-polyfill": "^1.5.0",
"tabbable": "^1.1.0",
"uuid": "^3.1.0",
"yarn": "^1.16.0"
"uuid": "^3.1.0"
},
"devDependencies": {
"@babel/cli": "^7.1.2",
Expand Down
5 changes: 2 additions & 3 deletions src-docs/src/views/badge/badge_button.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export default () => (
iconSide="right"
color="#333"
iconOnClick={() => window.alert('Icon inside badge clicked')}
iconOnClickAriaLabel="Example of onclick event for icon within the
button">
iconOnClickAriaLabel="Example of onclick event for icon within the button">
onClick on icon within badge
</EuiBadge>

Expand All @@ -30,7 +29,7 @@ export default () => (
iconOnClick={() => window.alert('Icon inside badge clicked')}
iconOnClickAriaLabel="Example of onclick event for icon within the
button">
onClick on icon within badge and itself
onClick on itself and the icon
</EuiBadge>
</div>
);
2 changes: 1 addition & 1 deletion src/components/badge/__snapshots__/badge.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exports[`EuiBadge is rendered with onClick provided 1`] = `
class="euiBadge__content"
>
<span>
Content
Content
</span>
</span>
</button>
Expand Down
10 changes: 6 additions & 4 deletions src/components/badge/badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ export const EuiBadge = ({
if (iconType) {
if (iconOnClick) {
optionalIcon = (
<button className="euiBadge__iconButton" onClick={iconOnClick}>
<button
aria-label={iconOnClickAriaLabel}
className="euiBadge__iconButton"
onClick={iconOnClick}>
<EuiIcon
type={iconType}
size="s"
aria-label={iconOnClickAriaLabel}
{...closeButtonProps}
className={closeClassNames}
/>
Expand All @@ -94,9 +96,9 @@ export const EuiBadge = ({
<span className="euiBadge__content">
{optionalIcon}
<button
aria-label={onClickAriaLabel}
className="euiBadge__childButton"
onClick={onClick}
aria-label={onClickAriaLabel}
{...rest}>
{children}
</button>
Expand All @@ -106,10 +108,10 @@ export const EuiBadge = ({
} else if (onClick) {
return (
<button
aria-label={onClickAriaLabel}
className={classes}
onClick={onClick}
style={optionalCustomStyles}
aria-label={onClickAriaLabel}
{...rest}>
<span className="euiBadge__content">
{optionalIcon}
Expand Down
1 change: 0 additions & 1 deletion src/components/badge/badge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ describe('EuiBadge', () => {
{...requiredProps}
onClick={jest.fn()}
onClickAriaLabel="Example of onclick event for the button">
{' '}
Content
</EuiBadge>
);
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15666,11 +15666,6 @@ yargs@^8.0.1:
y18n "^3.2.1"
yargs-parser "^7.0.0"

yarn@^1.16.0:
version "1.16.0"
resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.16.0.tgz#5701b58ac555ff91f7b889b7d791b3dc86f8f999"
integrity sha512-cfemyGlnWKA1zopUUgebTPf8C4WkPIZ+TJmklwcEAJ4u6oWPtJeAzrsamaGGh/+b1XWe8W51yzAImC4AWbWR1g==

[email protected]:
version "2.4.1"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005"
Expand Down

0 comments on commit db091eb

Please sign in to comment.