Update text for link styles

This commit is contained in:
jeffvli
2022-11-14 03:00:05 -08:00
parent 295eb82f20
commit 1bd538b6b4
+3 -1
View File
@@ -4,6 +4,7 @@ import {
Text as MantineText, Text as MantineText,
TextProps as MantineTextProps, TextProps as MantineTextProps,
} from '@mantine/core'; } from '@mantine/core';
import { Link } from 'react-router-dom';
import styled from 'styled-components'; import styled from 'styled-components';
import { Font, textEllipsis } from '@/renderer/styles'; import { Font, textEllipsis } from '@/renderer/styles';
@@ -24,7 +25,7 @@ const BaseText = styled(MantineText)<TextProps>`
color: ${(props) => color: ${(props) =>
props.$secondary ? 'var(--main-fg-secondary)' : 'var(--main-fg)'}; props.$secondary ? 'var(--main-fg-secondary)' : 'var(--main-fg)'};
font-family: ${(props) => props.font}; font-family: ${(props) => props.font};
cursor: default; cursor: ${(props) => (props.$link ? 'cursor' : 'default')};
user-select: ${(props) => (props.$noSelect ? 'none' : 'auto')}; user-select: ${(props) => (props.$noSelect ? 'none' : 'auto')};
${(props) => props.overflow === 'hidden' && textEllipsis} ${(props) => props.overflow === 'hidden' && textEllipsis}
@@ -45,6 +46,7 @@ export const _Text = ({
}: TextProps) => { }: TextProps) => {
return ( return (
<StyledText <StyledText
$link={rest.component === Link}
$noSelect={$noSelect} $noSelect={$noSelect}
$secondary={$secondary} $secondary={$secondary}
font={font} font={font}