Skip to content

Commit

Permalink
fix(code/frontend): wider clickable area for file and structure node (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
WangQianliang authored Feb 20, 2019
1 parent 9d36039 commit 71257ce
Show file tree
Hide file tree
Showing 5 changed files with 456 additions and 299 deletions.
13 changes: 9 additions & 4 deletions x-pack/plugins/code/public/components/main/directory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,17 @@ const DirectoryNodes = (props: DirectoryNodesProps) => {
[FileTreeItemType.Submodule]: 'submodule',
};
const nodes = props.nodes.map(n => (
<DirectoryNode key={n.path}>
<Link to={props.getUrl(n.path!)} data-test-subj={`codeFileExplorerNode-${n.name}`}>
<Link
className="code-link"
key={n.path}
to={props.getUrl(n.path!)}
data-test-subj={`codeFileExplorerNode-${n.name}`}
>
<DirectoryNode>
<EuiIcon type={typeIconMap[n.type]} color="black" />
<NodeName>{n.name}</NodeName>
</Link>
</DirectoryNode>
</DirectoryNode>
</Link>
));
return (
<Container>
Expand Down
6 changes: 6 additions & 0 deletions x-pack/plugins/code/public/components/main/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@
.code-auto-margin {
margin: auto;
}

.code-link {
&:focus {
box-shadow: none;
}
}
Loading

0 comments on commit 71257ce

Please sign in to comment.