- use <wbr> instead of ZERO-WIDTH SPACE (U+200B) to break segments - remove no-longer-needed onCopyCapture listener which previously stripped ZWSPs - update's deep-link.jsx's `text` prop type to accept `PropType.node` to allow the above. Closes #7513 Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>
21 lines
475 B
JavaScript
21 lines
475 B
JavaScript
import React from "react"
|
|
import PropTypes from "prop-types"
|
|
|
|
export const DeepLink = ({ enabled, path, text }) => {
|
|
return (
|
|
<a className="nostyle"
|
|
onClick={enabled ? (e) => e.preventDefault() : null}
|
|
href={enabled ? `#/${path}` : null}>
|
|
<span>{text}</span>
|
|
</a>
|
|
)
|
|
}
|
|
DeepLink.propTypes = {
|
|
enabled: PropTypes.bool,
|
|
isShown: PropTypes.bool,
|
|
path: PropTypes.string,
|
|
text: PropTypes.node
|
|
}
|
|
|
|
export default DeepLink
|