Skip to content

Instantly share code, notes, and snippets.

View diegohaz's full-sized avatar

Haz diegohaz

View GitHub Profile
// notifications.tsx
import * as Ariakit from "@ariakit/react";
interface Item extends Ariakit.NotificationStoreItem {
onUndo?: () => void;
}
export function useNotification() {
const notification = Ariakit.useNotificationContext();
if (!notification) {
@diegohaz
diegohaz / query.ts
Last active November 30, 2023 21:07
import {
queryByLabelText,
queryByRole,
queryByText,
} from "@testing-library/dom";
import type { ByRoleOptions, Matcher } from "@testing-library/dom";
const roles = [
"alert",
"alertdialog",
@diegohaz
diegohaz / ariakit-styles.md
Last active March 29, 2025 13:56
Ariakit Styles