[Blocks] Fix links colors (#18325)

* Fix links not using design system color

* Inherit text color in modifiers
This commit is contained in:
Rémi de Juvigny 2023-10-06 11:18:24 +02:00 committed by GitHub
parent 3dc168a35e
commit 2937bb9237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -326,6 +326,7 @@ const Link = React.forwardRef(({ element, children, ...attributes }, forwardedRe
ref={composedRefs}
href={element.url}
onClick={handleOpenEditPopover}
color="primary600"
>
{children}
</BaseLink>
@ -376,7 +377,7 @@ const Link = React.forwardRef(({ element, children, ...attributes }, forwardedRe
) : (
<Flex direction="column" gap={4} alignItems="start" width="400px">
<Typography>{elementText}</Typography>
<BaseLink href={element.url} target="_blank">
<BaseLink href={element.url} target="_blank" color="primary600">
{element.url}
</BaseLink>
<Flex justifyContent="end" width="100%" gap={2}>

View File

@ -8,19 +8,23 @@ import styled from 'styled-components';
const BoldText = styled(Typography).attrs({ fontWeight: 'bold' })`
font-size: inherit;
color: inherit;
`;
const ItalicText = styled(Typography)`
font-style: italic;
font-size: inherit;
color: inherit;
`;
const UnderlineText = styled(Typography).attrs({ textDecoration: 'underline' })`
font-size: inherit;
color: inherit;
`;
const StrikeThroughText = styled(Typography).attrs({ textDecoration: 'line-through' })`
font-size: inherit;
color: inherit;
`;
const InlineCode = styled.code`
@ -29,6 +33,7 @@ const InlineCode = styled.code`
padding: ${({ theme }) => `0 ${theme.spaces[2]}`};
font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas,
monospace;
color: inherit;
`;
/**