Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- `AlertDialog`: Rewrite internals to use Base UI's `AlertDialog` primitives directly instead of `Dialog` wrappers. Introduces an internal state machine for async confirm flows ([#76937](https://github.com/WordPress/gutenberg/pull/76937)).
- `Field.Label`, `Fieldset.Legend`, `Field.Details`: Refactor `VisuallyHidden` composition to preserve semantic HTML elements when visually hiding content.
- `Badge`: Use `Text` component for typography ([#77295](https://github.com/WordPress/gutenberg/pull/77295)).
- `Notice.ActionLink`: Use `Text` component for typography ([#77332](https://github.com/WordPress/gutenberg/pull/77332)).
- Update `@base-ui/react` from `1.3.0` to `1.4.0` ([#77308](https://github.com/WordPress/gutenberg/pull/77308)).

## 0.10.0 (2026-04-01)
Expand Down
11 changes: 7 additions & 4 deletions packages/ui/src/notice/action-link.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
import clsx from 'clsx';
import { forwardRef } from '@wordpress/element';
import { Link } from '../link';
import { Text } from '../text';
import type { ActionLinkProps } from './types';
import styles from './style.module.css';

/**
* An action link for use within Notice.Actions.
*/
export const ActionLink = forwardRef< HTMLAnchorElement, ActionLinkProps >(
function NoticeActionLink( { className, ...props }, ref ) {
function NoticeActionLink( { className, render, ...props }, ref ) {
return (
<Link
<Text
ref={ ref }
className={ clsx( styles[ 'action-link' ], className ) }
{ ...props }
tone="neutral"
variant="default"
variant="body-md"
render={
<Link tone="neutral" variant="default" render={ render } />
}
/>
);
}
Expand Down
10 changes: 5 additions & 5 deletions packages/ui/src/notice/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@

.action-link {
flex-shrink: 0;
font-family: var(--wpds-typography-font-family-body);
font-size: var(--wpds-typography-font-size-md);
font-weight: var(--wpds-typography-font-weight-regular);
line-height: var(--wpds-typography-line-height-sm);
margin-block: auto;

/* Add more horizontal space when following another action link/button */
&:not(:first-child) {
Expand Down Expand Up @@ -125,6 +120,11 @@
}

@layer wp-ui-compositions {
/* Override `Text` margin */
.action-link {
margin-block: auto;
}

/* Add partial transparency to CloseIcon and outline/minimal ActionButton
* for a better look over tinted backgrounds */
.close-icon,
Expand Down
Loading