File tree 3 files changed +86
-3
lines changed
3 files changed +86
-3
lines changed Original file line number Diff line number Diff line change 1
- import type { FC , ReactNode } from "react" ;
1
+ import type { FC , HTMLAttributes , ReactNode } from "react" ;
2
2
3
- export interface EmptyStateProps {
3
+ export interface EmptyStateProps extends HTMLAttributes < HTMLDivElement > {
4
4
/** Text Message to display, placed inside Typography component */
5
5
message : string ;
6
6
/** Longer optional description to display below the message */
7
7
description ?: string | ReactNode ;
8
8
cta ?: ReactNode ;
9
- className ?: string ;
10
9
image ?: ReactNode ;
11
10
}
12
11
Original file line number Diff line number Diff line change
1
+ import type { Meta , StoryObj } from "@storybook/react" ;
2
+ import Table from "@mui/material/Table" ;
3
+ import TableBody from "@mui/material/TableBody" ;
4
+ import TableContainer from "@mui/material/TableContainer" ;
5
+ import { CodeExample } from "components/CodeExample/CodeExample" ;
6
+ import { TableEmpty } from "./TableEmpty" ;
7
+
8
+ const meta : Meta < typeof TableEmpty > = {
9
+ title : "components/TableEmpty" ,
10
+ component : TableEmpty ,
11
+ args : {
12
+ message : "Unfortunately, there's a radio connected to my brain" ,
13
+ } ,
14
+ decorators : [
15
+ ( Story ) => (
16
+ < TableContainer >
17
+ < Table >
18
+ < TableBody >
19
+ < Story />
20
+ </ TableBody >
21
+ </ Table >
22
+ </ TableContainer >
23
+ ) ,
24
+ ] ,
25
+ } ;
26
+
27
+ export default meta ;
28
+ type Story = StoryObj < typeof TableEmpty > ;
29
+
30
+ export const Example : Story = { } ;
31
+
32
+ export const WithImageAndCta : Story = {
33
+ name : "With Image and CTA" ,
34
+ args : {
35
+ description : "A gruff voice crackles to life on the intercom." ,
36
+ cta : (
37
+ < CodeExample
38
+ secret = { false }
39
+ code = "say “Actually, it's the BBC controlling us from London”"
40
+ />
41
+ ) ,
42
+ image : (
43
+ < img
44
+ src = "/featured/templates.webp"
45
+ alt = ""
46
+ css = { {
47
+ maxWidth : 800 ,
48
+ height : 320 ,
49
+ overflow : "hidden" ,
50
+ objectFit : "cover" ,
51
+ objectPosition : "top" ,
52
+ } }
53
+ />
54
+ ) ,
55
+ style : { paddingBottom : 0 } ,
56
+ } ,
57
+ } ;
Original file line number Diff line number Diff line change
1
+ import type { Meta , StoryObj } from "@storybook/react" ;
2
+ import Table from "@mui/material/Table" ;
3
+ import TableBody from "@mui/material/TableBody" ;
4
+ import TableContainer from "@mui/material/TableContainer" ;
5
+ import { TableLoader } from "./TableLoader" ;
6
+
7
+ const meta : Meta < typeof TableLoader > = {
8
+ title : "components/TableLoader" ,
9
+ component : TableLoader ,
10
+ decorators : [
11
+ ( Story ) => (
12
+ < TableContainer >
13
+ < Table >
14
+ < TableBody >
15
+ < Story />
16
+ </ TableBody >
17
+ </ Table >
18
+ </ TableContainer >
19
+ ) ,
20
+ ] ,
21
+ } ;
22
+
23
+ export default meta ;
24
+ type Story = StoryObj < typeof TableLoader > ;
25
+
26
+ export const Example : Story = { } ;
27
+ export { Example as TableLoader } ;
You can’t perform that action at this time.
0 commit comments