From 1b49a15e860f1275a7feb631eddcb805bf6feb57 Mon Sep 17 00:00:00 2001 From: VinuGanesan Date: Wed, 27 Oct 2021 16:08:27 +0530 Subject: [PATCH 1/2] Header new prop added --- src/components/UHeader/UHeader.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/UHeader/UHeader.js b/src/components/UHeader/UHeader.js index 2a96acc89..9b42d2221 100644 --- a/src/components/UHeader/UHeader.js +++ b/src/components/UHeader/UHeader.js @@ -73,6 +73,7 @@ export default function UHeader(props) { openDrawer, toggleDrawer, elevation, + hoverTitle, } = props const handleUrlClick = e => { @@ -139,6 +140,7 @@ export default function UHeader(props) { underline="none" onClick={e => handleUrlClick(e)} href={logoUrl && logoUrl} + {...(hoverTitle ? { title: applicationName } : {})} > {applicationName} @@ -194,6 +196,8 @@ UHeader.propTypes = { toggleDrawer: PropTypes.func, /** AppBar elevation value to handle the box shadow effect */ elevation: PropTypes.number, + /** To show application name when hover */ + hoverTitle: PropTypes.bool, } UHeader.defaultProps = { @@ -203,4 +207,5 @@ UHeader.defaultProps = { logoUrl: '/', hideLogoBorderLine: true, elevation: 4, + hoverTitle: false, } From fd69fb1f43294e5fed21d6d5373b189d57b411dc Mon Sep 17 00:00:00 2001 From: VinuGanesan Date: Wed, 27 Oct 2021 16:50:29 +0530 Subject: [PATCH 2/2] UHeader title updated --- src/components/UHeader/UHeader.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/UHeader/UHeader.js b/src/components/UHeader/UHeader.js index 9b42d2221..f589a9ceb 100644 --- a/src/components/UHeader/UHeader.js +++ b/src/components/UHeader/UHeader.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import React from 'react' import { fade } from '@material-ui/core/styles/colorManipulator' import { makeStyles, createStyles } from '@material-ui/core/styles' import { findReactChildren } from '../../utils' @@ -73,7 +73,6 @@ export default function UHeader(props) { openDrawer, toggleDrawer, elevation, - hoverTitle, } = props const handleUrlClick = e => { @@ -140,7 +139,7 @@ export default function UHeader(props) { underline="none" onClick={e => handleUrlClick(e)} href={logoUrl && logoUrl} - {...(hoverTitle ? { title: applicationName } : {})} + title={applicationName} > {applicationName} @@ -196,8 +195,6 @@ UHeader.propTypes = { toggleDrawer: PropTypes.func, /** AppBar elevation value to handle the box shadow effect */ elevation: PropTypes.number, - /** To show application name when hover */ - hoverTitle: PropTypes.bool, } UHeader.defaultProps = { @@ -207,5 +204,4 @@ UHeader.defaultProps = { logoUrl: '/', hideLogoBorderLine: true, elevation: 4, - hoverTitle: false, }