Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

fix(AdSettingsCog + SvgIconWrapper): Changed cogwheel and svgIconWrapper type #1375

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion src/atoms/AdSettingsCog.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from '@emotion/styled';
import { getColor, getVariable } from '../utils';
import { SvgIcon } from './SvgIcon';

const StyledCog = styled.div`
const StyledCog = styled.button`
position: absolute;
left: 0;
top: 0;
Expand All @@ -13,6 +13,7 @@ const StyledCog = styled.div`
filter: alpha(opacity=50);
line-height: 0;
cursor: pointer;
border-width: 0px;
`;

const AdSettingsCog = props => (
Expand Down
2 changes: 1 addition & 1 deletion src/atoms/SvgIcon/SvgIconWrapper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from '@emotion/styled';

const SvgIconWrapper = styled('div', {
const SvgIconWrapper = styled('span', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed SvgIconWrapper to avoid putting a div (block element) inside a button element. Best practice i think :S Should i avoid doing it?

shouldForwardProp: prop => prop !== 'size',
})`
display: inline-block;
Expand Down