@@ -2,6 +2,7 @@ import { Code } from '@mantine/core';
22import type { Route } from 'next' ;
33import { CodeBlock } from '~/components/CodeBlock' ;
44import { PageNavigation } from '~/components/PageNavigation' ;
5+ import { PageSubtitle } from '~/components/PageSubtitle' ;
56import { PageTitle } from '~/components/PageTitle' ;
67import { Txt } from '~/components/Txt' ;
78import { readCodeFile } from '~/lib/code' ;
@@ -10,6 +11,7 @@ import {
1011 EmptyStateExample ,
1112 EmptyStateExampleCustomContent ,
1213 EmptyStateExampleCustomIconAndText ,
14+ EmptyStateExampleCustomInteractiveContent ,
1315 EmptyStateExampleCustomText ,
1416} from './EmptyStateExamples' ;
1517
@@ -19,9 +21,12 @@ export const metadata = getRouteMetadata(PATH);
1921
2022export default async function EmptyStateExamplePage ( ) {
2123 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` ) ,
2530 css : readCodeFile < string > ( `${ PATH } /EmptyStateExamples.module.css` ) ,
2631 } ) ;
2732
@@ -65,6 +70,15 @@ export default async function EmptyStateExamplePage() {
6570 </ Txt >
6671 < EmptyStateExampleCustomContent />
6772 < 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' ] } />
6882 < Txt > Head over to the next example to discover more features.</ Txt >
6983 < PageNavigation of = { PATH } />
7084 </ >
0 commit comments