Skip to content

Commit

Permalink
adding icon for docs and api link (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin-chaurasiya authored Aug 16, 2021
1 parent f6dd78f commit c2a9ea9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ const Appbar: React.FC = (): JSX.Element => {
to={{
pathname: 'https://docs.open-metadata.org/',
}}>
{/* <i className="fas fa-file-alt tw-pr-2" /> */}
<SVGIcons
alt="Doc icon"
className="tw-align-middle tw--mt-0.5 tw-mr-0.5"
icon="doc"
width="12"
/>
<span>Docs</span>
</NavLink>
<NavLink
Expand All @@ -149,7 +154,12 @@ const Appbar: React.FC = (): JSX.Element => {
to={{
pathname: '/docs',
}}>
{/* <i className="fas fa-sitemap tw-pr-2" /> */}
<SVGIcons
alt="API icon"
className="tw-align-middle tw--mt-0.5 tw-mr-0.5"
icon="api"
width="12"
/>
<span>API</span>
</NavLink>
<div data-testid="dropdown-profile">
Expand Down
12 changes: 12 additions & 0 deletions catalog-rest-service/src/main/resources/ui/src/utils/SvgUtils.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React, { FunctionComponent } from 'react';
import IconGoogle from '../assets/img/google-icon.png';
import IconAPI from '../assets/svg/api.svg';
import IconSuccess from '../assets/svg/check.svg';
import IconAsstest from '../assets/svg/data-assets.svg';
import IconDoc from '../assets/svg/doc.svg';
import IconError from '../assets/svg/error.svg';
import IconCheckCircle from '../assets/svg/ic-check-circle.svg';
import IconDelete from '../assets/svg/ic-delete.svg';
Expand Down Expand Up @@ -100,6 +102,8 @@ export const Icons = {
SERVICE: 'service',
USERS: 'users',
TERMS: 'terms',
DOC: 'doc',
API: 'api',
};

const SVGIcons: FunctionComponent<Props> = ({
Expand Down Expand Up @@ -297,6 +301,14 @@ const SVGIcons: FunctionComponent<Props> = ({
case Icons.TERMS:
IconComponent = IconTerns;

break;
case Icons.DOC:
IconComponent = IconDoc;

break;
case Icons.API:
IconComponent = IconAPI;

break;

default:
Expand Down

0 comments on commit c2a9ea9

Please sign in to comment.