A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
TypeScript amazon-primeelectronepic-games-launcherepic-games-storeepic-storegaminggoggog-galaxyheroic-games-launcherlinuxplay-gamesprotonsteamwine
import { expect } from 'storybook/test'
import type { Meta, StoryObj } from '@storybook/react-vite'
import BackButton from '.'
const meta = {
title: 'Navigation/BackButton',
component: BackButton,
args: {
to: '/',
label: 'Back to library'
}
} satisfies Meta<typeof BackButton>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {}
export const IconOnly: Story = {
args: { iconOnly: true },
play: async ({ canvas }) => {
const link = canvas.getByRole('link', { name: 'Back to library' })
await expect(link).toHaveAttribute('href', '/')
await expect(canvas.queryByText('Back to library')).not.toBeInTheDocument()
}
}
export const LinksToTheTarget: Story = {
play: async ({ canvas }) => {
await expect(
canvas.getByRole('link', { name: 'Back to library' })
).toHaveAttribute('href', '/')
}
}