mirror of https://github.com/grafana/grafana
Geomap: Improve tooltip url for photos layer (#63487)
parent
18fec707fd
commit
05a9946b18
@ -0,0 +1,16 @@ |
||||
import { cx } from '@emotion/css'; |
||||
import React from 'react'; |
||||
|
||||
import { isUrl } from './utils'; |
||||
|
||||
export const renderValue = (value: string): string | React.ReactNode => { |
||||
if (isUrl(value)) { |
||||
return ( |
||||
<a href={value} target={'_blank'} className={cx('external-link')} rel="noreferrer"> |
||||
{value} |
||||
</a> |
||||
); |
||||
} |
||||
|
||||
return value; |
||||
}; |
Loading…
Reference in new issue