@@ -2,6 +2,7 @@ import { Code } from '@mantine/core';
2
2
import type { Route } from 'next' ;
3
3
import { CodeBlock } from '~/components/CodeBlock' ;
4
4
import { PageNavigation } from '~/components/PageNavigation' ;
5
+ import { PageSubtitle } from '~/components/PageSubtitle' ;
5
6
import { PageTitle } from '~/components/PageTitle' ;
6
7
import { Txt } from '~/components/Txt' ;
7
8
import { readCodeFile } from '~/lib/code' ;
@@ -10,6 +11,7 @@ import {
10
11
EmptyStateExample ,
11
12
EmptyStateExampleCustomContent ,
12
13
EmptyStateExampleCustomIconAndText ,
14
+ EmptyStateExampleCustomInteractiveContent ,
13
15
EmptyStateExampleCustomText ,
14
16
} from './EmptyStateExamples' ;
15
17
@@ -19,9 +21,12 @@ export const metadata = getRouteMetadata(PATH);
19
21
20
22
export default async function EmptyStateExamplePage ( ) {
21
23
const rawCode = await allPromiseProps ( {
22
- tsx : readCodeFile < Record < 'default' | 'custom-text' | 'custom-icon-and-text' | 'custom-content' , string > > (
23
- `${ PATH } /EmptyStateExamples.tsx`
24
- ) ,
24
+ tsx : readCodeFile <
25
+ Record <
26
+ 'default' | 'custom-text' | 'custom-icon-and-text' | 'custom-content' | 'custom-interactive-content' ,
27
+ string
28
+ >
29
+ > ( `${ PATH } /EmptyStateExamples.tsx` ) ,
25
30
css : readCodeFile < string > ( `${ PATH } /EmptyStateExamples.module.css` ) ,
26
31
} ) ;
27
32
@@ -65,6 +70,15 @@ export default async function EmptyStateExamplePage() {
65
70
</ Txt >
66
71
< EmptyStateExampleCustomContent />
67
72
< CodeBlock code = { code [ 'custom-content' ] } />
73
+ < PageSubtitle value = "Interactive custom empty state content" />
74
+ < Txt >
75
+ The empty state component has the < Code > pointer-events</ Code > CSS property set to < Code > none</ Code > .
76
+ < br />
77
+ Which means that if you need to add interactive content to the custom empty state, you’ll have to enable pointer
78
+ interactions using the < Code > pointer-events</ Code > CSS prop:
79
+ </ Txt >
80
+ < EmptyStateExampleCustomInteractiveContent />
81
+ < CodeBlock code = { code [ 'custom-interactive-content' ] } />
68
82
< Txt > Head over to the next example to discover more features.</ Txt >
69
83
< PageNavigation of = { PATH } />
70
84
</ >
0 commit comments