Update: Ariakit Styles is in alpha. If you want to try it, join us on Discord (see the #news
channel).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// notifications.tsx | |
import * as Ariakit from "@ariakit/react"; | |
interface Item extends Ariakit.NotificationStoreItem { | |
onUndo?: () => void; | |
} | |
export function useNotification() { | |
const notification = Ariakit.useNotificationContext(); | |
if (!notification) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
queryByLabelText, | |
queryByRole, | |
queryByText, | |
} from "@testing-library/dom"; | |
import type { ByRoleOptions, Matcher } from "@testing-library/dom"; | |
const roles = [ | |
"alert", | |
"alertdialog", |
OlderNewer