Show spaces beta prompt when viewing a space without the beta

This commit is contained in:
Michael Telatynski 2021-04-28 08:41:31 +01:00
parent 505b200a87
commit 18a01d9271
6 changed files with 85 additions and 5 deletions

View file

@ -15,6 +15,7 @@ limitations under the License.
*/
import React from "react";
import classNames from "classnames";
import {_t} from "../../../languageHandler";
import AccessibleButton from "../elements/AccessibleButton";
@ -27,7 +28,12 @@ interface IProps {
}
export const BetaPill = ({ onClick }: { onClick?: () => void }) => {
return <span className="mx_BetaCard_betaPill" onClick={onClick}>
return <span
className={classNames("mx_BetaCard_betaPill", {
mx_BetaCard_betaPill_clickable: !!onClick,
})}
onClick={onClick}
>
{ _t("Beta") }
</span>;
};