Skip to content

Commit 3698f0a

Browse files
LinkButton component
1 parent 8f32fd9 commit 3698f0a

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { clsx } from '@lcov-viewer/core';
2+
import React from 'react';
3+
import classes from './LinkButton.module.less';
4+
5+
const LinkButton = ({ children, className, ...props }) => (
6+
<button className={clsx(classes.root, className)} {...props}>{children}</button>
7+
);
8+
9+
export default LinkButton;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@import "@lcov-viewer/core/styles/colors";
2+
3+
.root {
4+
border: none;
5+
outline: none;
6+
background: none;
7+
color: @color-main;
8+
text-decoration: none;
9+
margin: 0;
10+
padding: 0;
11+
font-family: inherit;
12+
font-size: inherit;
13+
cursor: pointer;
14+
15+
&:hover {
16+
color: darken(@color-main, 20%);
17+
}
18+
}

packages/components/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ export { default as TreeView } from './TreeView/TreeView';
22
export { default as Footer } from './Footer/Footer';
33
export { default as CoverageIndicator } from './CoverageIndicator/CoverageIndicator';
44
export { default as Summary } from './Summary/Summary';
5+
export { default as LinkButton } from './LinkButton/LinkButton';

0 commit comments

Comments
 (0)