Skip to content

Commit 7c6cb52

Browse files
committed
Fix Pretter issues
1 parent c2a9d32 commit 7c6cb52

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import {node, func} from 'prop-types';
2+
import { node, func } from 'prop-types';
33
import Button from '../button';
44
import Text from '../text';
55

@@ -11,22 +11,25 @@ const propTypes = {
1111
};
1212

1313
const defaultProps = {
14-
onClick: () => {},
14+
onClick: () => {},
1515
};
1616

1717
const Tag = ({ children, onClick }) => {
18-
console.log(children)
19-
return (
20-
<div className="rc-tag">
21-
<div className="rc-tag-label-background">
22-
<Text className="rc-tag-text">{children}</Text>
23-
</div>
24-
<Button className="rc-tag-remove-button" onClick={() => onClick()} icon="close" />
18+
return (
19+
<div className="rc-tag">
20+
<div className="rc-tag-label-background">
21+
<Text className="rc-tag-text">{children}</Text>
2522
</div>
26-
);
27-
};
23+
<Button
24+
className="rc-tag-remove-button"
25+
onClick={() => onClick()}
26+
icon="close"
27+
/>
28+
</div>
29+
);
30+
};
2831

2932
Tag.propTypes = propTypes;
3033
Tag.defaultProps = defaultProps;
31-
32-
export default Tag;
34+
35+
export default Tag;
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
## Overview
22

3-
The `Tag` component was designed and developed to be used primarily alongside the data grid filtering feature, as a clear indication of what filters are actively applied. However the component itself may have further usecases. The `Tag` component has been built on top of the `Button` component in order to make sure it inherit's all its accessability features.
3+
The `Tag` component was designed and developed to be used primarily alongside the data grid filtering feature, as a clear indication of what filters are actively applied. However the component itself may have further usecases. The `Tag` component has been built on top of the `Button` component in order to make sure it inherit's all its accessability features.
44

55
## Basic Use
66

7-
All text can be passed to the `Tag` as a child, a callback function can be passed to the onClick prop to catch a users interactions.
7+
All text can be passed to the `Tag` as a child, a callback function can be passed to the onClick prop to catch a users interactions.
88

99
```jsx
1010
const onTagClick = () => {
11-
console.log('The X was clicked')
12-
}
11+
console.log('The X was clicked');
12+
};
1313

1414
<div>
1515
<div>
1616
<Tag onClick={onTagClick}>Tag label</Tag>
1717
</div>
18-
</div>
18+
</div>;
1919
```
2020

2121
## Related
2222

2323
- [Badge](#/React%20Components/Badge)
24-
- [Button](#/React%20Components/Button)
24+
- [Button](#/React%20Components/Button)
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import Tag from './Tag';
22

3-
export default Tag;
3+
export default Tag;

0 commit comments

Comments
 (0)