generally consistent across web/ios
This commit is contained in:
+16
-23
@@ -7,7 +7,7 @@ import {
|
||||
|
||||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {Text, CustomTextProps} from 'view/com/util/text/Text'
|
||||
import {Link} from 'view/com/util/Link'
|
||||
import {TextLink} from 'view/com/util/Link'
|
||||
|
||||
export function Tag({
|
||||
value,
|
||||
@@ -20,16 +20,13 @@ export function Tag({
|
||||
const type = textSize || 'xs-medium'
|
||||
|
||||
return (
|
||||
<Link
|
||||
asAnchor
|
||||
<TextLink
|
||||
type={type}
|
||||
text={`#${value}`}
|
||||
accessible
|
||||
anchorNoUnderline
|
||||
href={`/search?q=${value}`}
|
||||
style={[pal.viewLight, styles.tag]}>
|
||||
<Text type={type} style={[pal.textLight]}>
|
||||
#{value}
|
||||
</Text>
|
||||
</Link>
|
||||
style={[pal.textLight]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -44,23 +41,19 @@ export function InlineTag({
|
||||
const type = textSize || 'xs-medium'
|
||||
|
||||
return (
|
||||
<Link
|
||||
asAnchor
|
||||
<TextLink
|
||||
type={type}
|
||||
text={`#${value}`}
|
||||
accessible
|
||||
anchorNoUnderline
|
||||
href={`/search?q=${value}`}
|
||||
style={[
|
||||
pal.viewLight,
|
||||
styles.tag,
|
||||
pal.link,
|
||||
{
|
||||
paddingTop: 0,
|
||||
paddingBottom: 2,
|
||||
},
|
||||
]}>
|
||||
<Text type={type} style={[pal.textLight]}>
|
||||
#{value}
|
||||
</Text>
|
||||
</Link>
|
||||
]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -90,14 +83,14 @@ export function EditableTag({
|
||||
onPointerLeave={hoverOut}
|
||||
style={state => [
|
||||
pal.viewLight,
|
||||
styles.tag,
|
||||
styles.editableTag,
|
||||
{
|
||||
opacity: state.pressed || state.focused ? 0.8 : 1,
|
||||
outline: 0,
|
||||
paddingRight: 6,
|
||||
},
|
||||
]}>
|
||||
<Text type="md-medium" style={[pal.textLight, {lineHeight: 13}]}>
|
||||
<Text type="md-medium" style={[pal.textLight]}>
|
||||
#{value}
|
||||
</Text>
|
||||
<FontAwesomeIcon
|
||||
@@ -116,11 +109,11 @@ export function EditableTag({
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
tag: {
|
||||
editableTag: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
gap: 6,
|
||||
paddingTop: 3,
|
||||
paddingTop: 4,
|
||||
paddingBottom: 4,
|
||||
paddingHorizontal: 8,
|
||||
borderRadius: 4,
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
StyleSheet,
|
||||
NativeSyntheticEvent,
|
||||
TextInputKeyPressEventData,
|
||||
Platform,
|
||||
} from 'react-native'
|
||||
import {
|
||||
FontAwesomeIcon,
|
||||
@@ -141,8 +142,11 @@ const styles = StyleSheet.create({
|
||||
flexGrow: 1,
|
||||
minWidth: 100,
|
||||
fontSize: 15,
|
||||
lineHeight: 15,
|
||||
paddingTop: 5,
|
||||
paddingBottom: 6,
|
||||
lineHeight: Platform.select({
|
||||
web: 20,
|
||||
native: 18,
|
||||
}),
|
||||
paddingTop: 4,
|
||||
paddingBottom: 4,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -333,12 +333,17 @@ export const PostThreadItem = observer(function PostThreadItem({
|
||||
{AppBskyFeedPost.isRecord(item.post.record) &&
|
||||
item.post.record.tags?.length ? (
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
gap: 8,
|
||||
paddingBottom: 12,
|
||||
}}>
|
||||
style={[
|
||||
pal.border,
|
||||
{
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
gap: 8,
|
||||
paddingBottom: 12,
|
||||
marginBottom: 12,
|
||||
borderBottomWidth: 1,
|
||||
},
|
||||
]}>
|
||||
{item.post.record.tags.map(tag => (
|
||||
<Tag key={tag} value={tag} textSize="md-medium" />
|
||||
))}
|
||||
@@ -387,7 +392,7 @@ export const PostThreadItem = observer(function PostThreadItem({
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
<View style={[s.pl10, s.pb5]}>
|
||||
<View style={[s.pb5]}>
|
||||
<PostCtrls
|
||||
big
|
||||
itemUri={itemUri}
|
||||
@@ -718,7 +723,7 @@ const useStyles = () => {
|
||||
},
|
||||
expandedInfo: {
|
||||
flexDirection: 'row',
|
||||
padding: 10,
|
||||
paddingVertical: 10,
|
||||
borderTopWidth: 1,
|
||||
borderBottomWidth: 1,
|
||||
marginTop: 5,
|
||||
|
||||
Reference in New Issue
Block a user