diff options
Diffstat (limited to 'src/view/com/profile')
-rw-r--r-- | src/view/com/profile/FollowButton.tsx | 14 | ||||
-rw-r--r-- | src/view/com/profile/ProfileCard.tsx | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/view/com/profile/FollowButton.tsx b/src/view/com/profile/FollowButton.tsx index f799e26f2..7e25fd88a 100644 --- a/src/view/com/profile/FollowButton.tsx +++ b/src/view/com/profile/FollowButton.tsx @@ -6,13 +6,15 @@ import {useStores} from 'state/index' import * as Toast from '../util/Toast' import {FollowState} from 'state/models/cache/my-follows' -const FollowButton = observer( +export const FollowButton = observer( ({ - type = 'inverted', + unfollowedType = 'inverted', + followedType = 'inverted', did, onToggleFollow, }: { - type?: ButtonType + unfollowedType?: ButtonType + followedType?: ButtonType did: string onToggleFollow?: (v: boolean) => void }) => { @@ -48,12 +50,12 @@ const FollowButton = observer( return ( <Button - type={followState === FollowState.Following ? 'default' : type} + type={ + followState === FollowState.Following ? followedType : unfollowedType + } onPress={onToggleFollowInner} label={followState === FollowState.Following ? 'Unfollow' : 'Follow'} /> ) }, ) - -export default FollowButton diff --git a/src/view/com/profile/ProfileCard.tsx b/src/view/com/profile/ProfileCard.tsx index 0beac8a7f..339e535ad 100644 --- a/src/view/com/profile/ProfileCard.tsx +++ b/src/view/com/profile/ProfileCard.tsx @@ -8,7 +8,7 @@ import {UserAvatar} from '../util/UserAvatar' import {s} from 'lib/styles' import {usePalette} from 'lib/hooks/usePalette' import {useStores} from 'state/index' -import FollowButton from './FollowButton' +import {FollowButton} from './FollowButton' export function ProfileCard({ testID, |