Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Added title prop to dcc.Link #768

Merged
merged 10 commits into from
Mar 17, 2020
8 changes: 7 additions & 1 deletion src/components/Link.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class Link extends Component {
}

render() {
const {className, style, id, href, loading_state} = this.props;
const {className, style, id, href, title,loading_state} = this.props;
/*
* ideally, we would use cloneElement however
* that doesn't work with dash's recursive
Expand All @@ -70,6 +70,7 @@ export default class Link extends Component {
style={style}
href={href}
onClick={e => this.updateLocation(e)}
title={title}
>
{this.props.children}
</a>
Expand Down Expand Up @@ -100,6 +101,11 @@ Link.propTypes = {
* Defines CSS styles which will override styles previously set.
*/
style: PropTypes.object,
/**
* Adds the title attribute to your link, which can contain supplementary
* information.
*/
title: PropTypes.string,
/**
* The children of this component
*/
Expand Down