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:
Kerry 2022-05-27 11:58:39 +02:00 committed by GitHub
parent 12abbf4042
commit 15c2fb6b71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 254 additions and 31 deletions

View file

@ -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")}