# extendify/3.2.0/src/Notifications/templates/Pill.jsx

Extendify, version 3.2.0. 32 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.2.0/code/src/Notifications/templates/Pill.jsx
- Raw: https://pluginprobe.com/plugins/extendify/3.2.0/raw/src/Notifications/templates/Pill.jsx
- Modified: 2026-08-27T17:39:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.2.0/code/src/Notifications/templates/Pill.jsx#L10-L20`.

```jsx
import { Icon } from '@wordpress/icons';
import classNames from 'classnames';
import { bannerButtonVariables, buttonHoverClasses, colorsOf } from '../colors';
import { iconFor } from '../icons';
import { externalLinkProps } from '../notification-link';

export const Pill = ({ notification, href, external, onClick }) => {
	const ctaLabel = notification['cta-label'];
	const icon = iconFor(notification.icon);
	const colors = colorsOf(notification);

	return (
		<a
			href={href}
			{...externalLinkProps(external)}
			onClick={onClick}
			// Without this the pill has no accessible name where CSS hides the label.
			aria-label={ctaLabel}
			// Core's admin bar is taller below the md breakpoint; the pill matches it.
			className={classNames(
				'inline-flex h-7.5 shrink-0 cursor-pointer items-center gap-1 rounded-sm bg-banner-main px-2.5 text-sm leading-none text-banner-text no-underline md:h-6 md:text-[13px]',
				buttonHoverClasses(colors),
			)}
			style={bannerButtonVariables(colors)}
			data-test="notification-pill"
		>
			{icon && <Icon icon={icon} size={16} className="fill-current" />}
			<span className="ext-notification-pill-label">{ctaLabel}</span>
		</a>
	);
};

```
