Skip to content

Commit

Permalink
Fixed info icon tabbing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 4, 2021
1 parent 5243d47 commit 149231c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 4 additions & 4 deletions ui/public/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="favicon.ico" />
<meta charset="utf-8">
<title>Shibboleth IDP UI</title>
<base href="/">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="icon" type="image/png" sizes="96x96" href="assets/favicon-96x96.png">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function App() {
},
response: async ({response}) => {
if (response.type === "opaqueredirect") {
setShowTimeout(true);
//setShowTimeout(true);
}

return response;
Expand Down
12 changes: 9 additions & 3 deletions ui/src/app/form/component/InfoIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
import Popover from 'react-bootstrap/Popover';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Button from 'react-bootstrap/Button';
import Translate from '../../i18n/components/translate';
import { useTranslator } from '../../i18n/hooks';

export function InfoIcon ({ value, placement='left', ...props }) {
const translate = useTranslator();
return(
<OverlayTrigger trigger={['hover', 'focus']} placement={placement} overlay={(
<OverlayTrigger trigger={['hover', 'focus', 'click']} placement={placement} overlay={(
<Popover variant="info">
<Popover.Content><Translate value={value} /></Popover.Content>
</Popover>
)}>
<FontAwesomeIcon className="text-primary" icon={faInfoCircle} size="lg" {...props} />
)}
aria-label={translate('tooltip.instruction')}>
<Button variant="text">
<FontAwesomeIcon className="text-primary" icon={faInfoCircle} size="lg" {...props} />
</Button>
</OverlayTrigger>
);
}

0 comments on commit 149231c

Please sign in to comment.