Support 'actionType' prop in ActionButton

This commit is contained in:
Justin
2022-05-03 13:22:06 -04:00
parent 8dc7cc8794
commit c758c5c2f9
4 changed files with 52 additions and 18 deletions

View File

@@ -46,6 +46,8 @@ interface IAccount {
actionAlignment?: 'center' | 'top',
actionIcon?: string,
actionTitle?: string,
/** Override other actions for specificity like mute/unmute. */
actionType?: 'muting' | 'blocking',
avatarSize?: number,
hidden?: boolean,
hideActions?: boolean,
@@ -60,6 +62,7 @@ interface IAccount {
const Account = ({
account,
actionType,
action,
actionIcon,
actionTitle,
@@ -111,7 +114,7 @@ const Account = ({
}
if (account.id !== me) {
return <ActionButton account={account} />;
return <ActionButton account={account} actionType={actionType} />;
}
return null;