-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add
eslint-plugin-jsx-a11y
plugin (#1348)
- Loading branch information
1 parent
bf5b78b
commit e815764
Showing
13 changed files
with
170 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 13 additions & 10 deletions
23
...ages/fuselage/src/components/Message/MessageGenericPreview/MessageGenericPreviewTitle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
import type { AnchorHTMLAttributes, HTMLAttributes, ReactNode } from 'react'; | ||
import type { AnchorHTMLAttributes, HTMLAttributes } from 'react'; | ||
|
||
type MessageGenericPreviewTitleProps = { | ||
children?: ReactNode; | ||
externalUrl?: string; | ||
} & HTMLAttributes<HTMLSpanElement> & | ||
AnchorHTMLAttributes<HTMLAnchorElement>; | ||
|
||
export const MessageGenericPreviewTitle = ({ | ||
externalUrl, | ||
children, | ||
...props | ||
}: MessageGenericPreviewTitleProps) => | ||
externalUrl ? ( | ||
<span> | ||
}: MessageGenericPreviewTitleProps) => { | ||
if (externalUrl) { | ||
return ( | ||
<a | ||
className='rcx-message-generic-preview__title rcx-message-generic-preview__title-link' | ||
href={externalUrl} | ||
target='_blank' | ||
{...props} | ||
/> | ||
</span> | ||
) : ( | ||
<span className='rcx-message-generic-preview__title' {...props} /> | ||
); | ||
> | ||
{children} | ||
</a> | ||
); | ||
} | ||
|
||
return <span className='rcx-message-generic-preview__title' {...props} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.