Add helper components for UI
Changes:
- Extracted Copyright from LoginDialog file to its own
- Added some helper components
- Removed unnecessary setup from welcome animation
- Added custom React type for svg element
- Fixed ThemeDemonstrator
GitLab: #12
Change-Id: Ie7158520983dab5c7069f179b6f9531b5106ba85
diff --git a/client/src/components/Button.tsx b/client/src/components/Button.tsx
index 25ddf39..0d401a2 100644
--- a/client/src/components/Button.tsx
+++ b/client/src/components/Button.tsx
@@ -49,6 +49,7 @@
VideoCameraIcon,
VolumeIcon,
} from './SvgIcon';
+import CustomTooltip from './Tooltip';
type ShapedButtonProps = IconButtonProps & {
Icon: ComponentType<SvgIconProps>;
@@ -99,8 +100,15 @@
return <RoundButton {...props} aria-label="take picture" Icon={CameraIcon} size="large" />;
};
-export const InfoButton = (props: IconButtonProps) => {
- return <RoundButton {...props} aria-label="informations" Icon={InfoIcon} size="small" />;
+type InfoButtonProps = IconButtonProps & {
+ tooltipTitle: string;
+};
+export const InfoButton = ({ tooltipTitle, ...props }: InfoButtonProps) => {
+ return (
+ <CustomTooltip className="tooltip" title={tooltipTitle}>
+ <RoundButton {...props} aria-label="informations" Icon={InfoIcon} size="small" />
+ </CustomTooltip>
+ );
};
export const TipButton = (props: IconButtonProps) => {