mirror of
https://github.com/mantinedev/next-app-template.git
synced 2026-07-25 01:13:14 +10:00
Add example with mantine tests package
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { render, screen } from '@/test-utils';
|
||||
import { render, screen, tests } from '@/test-utils';
|
||||
import { Welcome } from './Welcome';
|
||||
|
||||
describe('Welcome component', () => {
|
||||
tests.itSupportsClassName({ component: Welcome, props: {} });
|
||||
|
||||
it('has correct Next.js theming section link', () => {
|
||||
render(<Welcome />);
|
||||
expect(screen.getByText('this guide')).toHaveAttribute(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Title, Text, Anchor } from '@mantine/core';
|
||||
import classes from './Welcome.module.css';
|
||||
|
||||
export function Welcome() {
|
||||
export function Welcome(props: React.ComponentPropsWithoutRef<'div'>) {
|
||||
return (
|
||||
<>
|
||||
<div {...props}>
|
||||
<Title className={classes.title} ta="center" mt={100}>
|
||||
Welcome to{' '}
|
||||
<Text inherit variant="gradient" component="span" gradient={{ from: 'pink', to: 'yellow' }}>
|
||||
@@ -18,6 +18,6 @@ export function Welcome() {
|
||||
</Anchor>
|
||||
. To get started edit page.tsx file.
|
||||
</Text>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user