Skip to content

Commit

Permalink
(fix) O3-3890 Help menu (and menu items) should use a standard Carbon…
Browse files Browse the repository at this point in the history
… menu
  • Loading branch information
Samstar10 committed Sep 26, 2024
1 parent 26d30e5 commit 1df72a9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import styles from './styles.scss';
import { ArrowUpRight } from '@carbon/react/icons';
import { Link } from '@carbon/react';
import { MenuItem } from '@carbon/react';

const ContactUs = () => {
const { t } = useTranslation();
return (
<Link
<MenuItem
className={styles.helpButton}
href="https://talk.openmrs.org"
rel="noopener noreferrer"
renderIcon={ArrowUpRight}
target="_blank"
>
{t('communityforum', 'Community forum')}
</Link>
label={t('communityforum', 'Community forum')}
onClick={() => window.open('https://talk.openmrs.org', '_blank')}
/>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import styles from './styles.scss';
import { ArrowUpRight } from '@carbon/react/icons';
import { Link } from '@carbon/react';
import { MenuItem } from '@carbon/react';

const Docs = () => {
const { t } = useTranslation();
return (
<Link
<MenuItem
className={styles.helpButton}
href="https://o3-docs.openmrs.org"
rel="noopener noreferrer"
renderIcon={ArrowUpRight}
target="_blank"
>
{t('docs', 'Docs')}
</Link>
label={t('documentation', 'Documentation')}
onClick={() => window.open('https://o3-docs.openmrs.org', '_blank')}
/>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import styles from './styles.scss';
import { ArrowUpRight } from '@carbon/react/icons';
import { Link } from '@carbon/react';
import { MenuItem } from '@carbon/react';

const ReleaseNotes = () => {
const { t } = useTranslation();

return (
<Link
<MenuItem
className={styles.helpButton}
href="https://o3-docs.openmrs.org/docs/changelog"
rel="noopener noreferrer"
renderIcon={ArrowUpRight}
target="_blank"
>
{t('releaseNotes', 'Release notes')}
</Link>
label={t('releaseNotes', 'Release notes')}
onClick={() => window.open('https://o3-docs.openmrs.org/docs/changelog', '_blank')}
/>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
@import '~@openmrs/esm-styleguide/src/vars';

.helpButton {
display: flex;
align-items: center;
justify-content: space-between;
color: black !important;
&:focus {
outline: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
flex: auto;
bottom: 2rem;
right: 3rem;
width: 11rem;
width: 12rem;
z-index: 8000;
background-color: $ui-02;
gap: spacing.$spacing-05;
Expand Down

0 comments on commit 1df72a9

Please sign in to comment.