mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-16 16:34:24 +02:00
Update text for link styles
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user