Skip to content

Commit

Permalink
adding onclick to the badge component
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Aug 24, 2020
1 parent 8e113d1 commit b71350e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import React from 'react';
import { EuiFlexGrid, EuiFlexItem, EuiBadge, EuiIcon } from '@elastic/eui';
import { EuiFlexGrid, EuiFlexItem, EuiBadge } from '@elastic/eui';
import styled from 'styled-components';
import { unit, px, truncate } from '../../../../style/variables';

Expand All @@ -31,9 +31,14 @@ function FilterBadgeList({ onRemove, value }: Props) {
onRemove(val);
}}
onClickAriaLabel="Remove filter"
iconOnClick={() => {
onRemove(val);
}}
iconOnClickAriaLabel="Remove filter"
iconType="cross"
iconSide="right"
>
<BadgeText>{val}</BadgeText>
<EuiIcon type="cross" />
</EuiBadge>
</EuiFlexItem>
))}
Expand Down

0 comments on commit b71350e

Please sign in to comment.