Skip to content

Commit 3cd7491

Browse files
authored
Merge pull request #10 from karpolan/dev
fix: AppLink didn't use config values
2 parents e470193 + 5cc8574 commit 3cd7491

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-typescript-material",
3-
"version": "2.0.13",
3+
"version": "2.0.15",
44
"description": "_DESCRIPTION_",
55
"author": {
66
"name": "Anton Karpenko",

src/components/AppLink/AppLink.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { forwardRef, ReactNode } from 'react';
22
import { Link as RouterLink } from 'react-router-dom';
33
import MuiLink, { LinkProps as MuiLinkProps } from '@mui/material/Link';
4-
5-
const DEFAULT_APP_LINK_COLOR = 'textSecondary'; // 'primary' // 'secondary'
6-
const DEFAULT_APP_LINK_UNDERLINE = 'hover'; // 'always
4+
import { APP_LINK_COLOR, APP_LINK_UNDERLINE } from '../config';
75

86
interface Props extends MuiLinkProps {
97
children: ReactNode;
@@ -24,8 +22,8 @@ const AppLink = forwardRef<any, Props>(
2422
(
2523
{
2624
children,
27-
color = DEFAULT_APP_LINK_COLOR,
28-
underline = DEFAULT_APP_LINK_UNDERLINE,
25+
color = APP_LINK_COLOR,
26+
underline = APP_LINK_UNDERLINE,
2927
to = '',
3028
href,
3129
openInNewTab = Boolean(href), // Open external links in new Tab by default

0 commit comments

Comments
 (0)