Reintroduce emphasis on inbox note action button (https://github.com/woocommerce/woocommerce-admin/pull/8411)

* Reintroduce emphasis on inbox note action button

* Add changelog

* Remove actioned note gray color style
This commit is contained in:
Chi-Hsuan Huang 2022-03-07 17:14:49 +08:00 committed by GitHub
parent be7e73d484
commit ac660167a0
4 changed files with 11 additions and 5 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: Fix
Reintroduce emphasis on inbox note action button. #8411

View File

@ -9,6 +9,7 @@ type InboxNoteActionProps = {
label: string;
href?: string;
preventBusyState?: boolean;
variant: 'link' | 'secondary';
};
/**
@ -20,6 +21,7 @@ export const InboxNoteActionButton: React.FC< InboxNoteActionProps > = ( {
onClick,
href,
preventBusyState,
variant = 'link',
} ) => {
const [ inAction, setInAction ] = useState( false );
@ -53,7 +55,8 @@ export const InboxNoteActionButton: React.FC< InboxNoteActionProps > = ( {
return (
<Button
isLink={ true }
isSecondary={ variant === 'secondary' }
isLink={ variant === 'link' }
isBusy={ inAction }
disabled={ inAction }
href={ href }

View File

@ -128,6 +128,7 @@ const InboxNoteCard: React.FC< InboxNoteProps > = ( {
<InboxNoteActionButton
key={ action.id }
label={ action.label }
variant="secondary"
href={
action && action.url && action.url.length
? action.url
@ -198,6 +199,7 @@ const InboxNoteCard: React.FC< InboxNoteProps > = ( {
key={ note.actions[ 0 ].id }
label={ title }
preventBusyState={ true }
variant="link"
href={
note.actions[ 0 ].url &&
note.actions[ 0 ].url.length

View File

@ -36,9 +36,6 @@
font-weight: normal;
}
}
.woocommerce-inbox-message__actions a {
color: $gray-900;
}
}
.woocommerce-homepage-column & {
@ -192,7 +189,7 @@
}
}
}
.woocommerce-inbox-message__wrapper .woocommerce-inbox-message__actions {
.woocommerce-inbox-message__wrapper {
padding-top: 0;
}