add title attr to text text links (#1228)

* add title attr to text text links

* Revert "add title attr to text text links"

This reverts commit c028cd184efd3b2788d8f46134eecf521e5d7b07.

* use css tooltips

* add to expanded post state

* handle theming

* add to bskyweb
This commit is contained in:
Eric Bailey 2023-08-22 13:04:17 -05:00 committed by GitHub
parent 16b265a861
commit 548ec6c82d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 166 additions and 22 deletions

View file

@ -135,6 +135,7 @@ export const TextLink = observer(function TextLink({
numberOfLines,
lineHeight,
dataSet,
title,
}: {
testID?: string
type?: TypographyVariant
@ -144,6 +145,7 @@ export const TextLink = observer(function TextLink({
numberOfLines?: number
lineHeight?: number
dataSet?: any
title?: string
} & TextProps) {
const {...props} = useLinkProps({to: sanitizeUrl(href)})
const store = useStores()
@ -173,8 +175,8 @@ export const TextLink = observer(function TextLink({
style={style}
numberOfLines={numberOfLines}
lineHeight={lineHeight}
// @ts-ignore web only -prf
dataSet={dataSet}
title={title}
// @ts-ignore web only -prf
hrefAttrs={hrefAttrs} // hack to get open in new tab to work on safari. without this, safari will open in a new window
{...props}>
@ -197,6 +199,7 @@ interface DesktopWebTextLinkProps extends TextProps {
accessible?: boolean
accessibilityLabel?: string
accessibilityHint?: string
title?: string
}
export const DesktopWebTextLink = observer(function DesktopWebTextLink({
testID,
@ -218,6 +221,7 @@ export const DesktopWebTextLink = observer(function DesktopWebTextLink({
text={text}
numberOfLines={numberOfLines}
lineHeight={lineHeight}
title={props.title}
{...props}
/>
)
@ -229,6 +233,7 @@ export const DesktopWebTextLink = observer(function DesktopWebTextLink({
style={style}
numberOfLines={numberOfLines}
lineHeight={lineHeight}
title={props.title}
{...props}>
{text}
</Text>