Skip to content

Commit

Permalink
fix: AppLink didn't use config values
Browse files Browse the repository at this point in the history
  • Loading branch information
karpolan committed Dec 16, 2022
1 parent 8ce9a63 commit 5cc8574
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-typescript-material",
"version": "2.0.13",
"version": "2.0.15",
"description": "_DESCRIPTION_",
"author": {
"name": "Anton Karpenko",
Expand Down
8 changes: 3 additions & 5 deletions src/components/AppLink/AppLink.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { forwardRef, ReactNode } from 'react';
import { Link as RouterLink } from 'react-router-dom';
import MuiLink, { LinkProps as MuiLinkProps } from '@mui/material/Link';

const DEFAULT_APP_LINK_COLOR = 'textSecondary'; // 'primary' // 'secondary'
const DEFAULT_APP_LINK_UNDERLINE = 'hover'; // 'always
import { APP_LINK_COLOR, APP_LINK_UNDERLINE } from '../config';

interface Props extends MuiLinkProps {
children: ReactNode;
Expand All @@ -24,8 +22,8 @@ const AppLink = forwardRef<any, Props>(
(
{
children,
color = DEFAULT_APP_LINK_COLOR,
underline = DEFAULT_APP_LINK_UNDERLINE,
color = APP_LINK_COLOR,
underline = APP_LINK_UNDERLINE,
to = '',
href,
openInNewTab = Boolean(href), // Open external links in new Tab by default
Expand Down

0 comments on commit 5cc8574

Please sign in to comment.