Live location sharing - open location in OpenStreetMap (PSF-1040) (#8695)
* share plain lat,lon string from beacon tooltip and list item Signed-off-by: Kerry Archibald <kerrya@element.io> * export makeMapSiteLink helper fn Signed-off-by: Kerry Archibald <kerrya@element.io> * use currentColor in external-link.svg Signed-off-by: Kerry Archibald <kerrya@element.io> * add open in openstreetmap link Signed-off-by: Kerry Archibald <kerrya@element.io> * fussy import ordering Signed-off-by: Kerry Archibald <kerrya@element.io> * fix icon color var Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
12abbf4042
commit
15c2fb6b71
14 changed files with 254 additions and 31 deletions
|
@ -27,9 +27,10 @@ interface IProps {
|
|||
children?: React.ReactNode;
|
||||
getTextToCopy: () => string;
|
||||
border?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const CopyableText: React.FC<IProps> = ({ children, getTextToCopy, border=true }) => {
|
||||
const CopyableText: React.FC<IProps> = ({ children, getTextToCopy, border=true, className }) => {
|
||||
const [tooltip, setTooltip] = useState<string | undefined>(undefined);
|
||||
|
||||
const onCopyClickInternal = async (e: ButtonEvent) => {
|
||||
|
@ -44,11 +45,11 @@ const CopyableText: React.FC<IProps> = ({ children, getTextToCopy, border=true }
|
|||
}
|
||||
};
|
||||
|
||||
const className = classNames("mx_CopyableText", {
|
||||
const combinedClassName = classNames("mx_CopyableText", className, {
|
||||
mx_CopyableText_border: border,
|
||||
});
|
||||
|
||||
return <div className={className}>
|
||||
return <div className={combinedClassName}>
|
||||
{ children }
|
||||
<AccessibleTooltipButton
|
||||
title={tooltip ?? _t("Copy")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue