File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed
src/components/ScrollableTable Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 35
35
width : 100% ;
36
36
}
37
37
38
- @media screen and (max- width: $breakpoint-large ) {
38
+ @media screen and (width < $breakpoint-large ) {
39
39
.p-table--mobile-card {
40
40
thead {
41
41
display : none ;
Original file line number Diff line number Diff line change @@ -13,13 +13,12 @@ export default meta;
13
13
14
14
type Story = StoryObj < typeof ScrollableTable > ;
15
15
16
- const StoryExample = ( args : Story [ "args" ] ) => {
16
+ const StoryExample = ( args : Story [ "args" ] & { responsive ?: boolean } ) => {
17
17
const headers = [
18
18
{ content : "Fact" } ,
19
19
{ content : "Relevancy score" } ,
20
20
{ content : "Size" } ,
21
21
{ content : "ID" } ,
22
- { "aria-label" : "Actions" , className : "actions" } ,
23
22
] ;
24
23
25
24
const facts = [
@@ -57,7 +56,12 @@ const StoryExample = (args: Story["args"]) => {
57
56
dependencies = { [ headers , rows ] }
58
57
tableId = "facts-about-dragons"
59
58
>
60
- < MainTable headers = { headers } rows = { rows } id = "facts-about-dragons" />
59
+ < MainTable
60
+ headers = { headers }
61
+ rows = { rows }
62
+ responsive = { args [ "responsive" ] }
63
+ id = "facts-about-dragons"
64
+ />
61
65
</ ScrollableTable >
62
66
< div id = "footer" >
63
67
< h2 className = "u-no-margin" > Below contents</ h2 >
@@ -84,3 +88,21 @@ export const Default: Story = {
84
88
} ,
85
89
} ,
86
90
} ;
91
+
92
+ export const Responsive : Story = {
93
+ args : {
94
+ belowIds : [ "footer" ] ,
95
+ } ,
96
+ render : ( args ) => StoryExample ( { ...args , responsive : true } ) ,
97
+ parameters : {
98
+ docs : {
99
+ page : ( ) => (
100
+ < >
101
+ < Title />
102
+ < Subtitle />
103
+ < Description />
104
+ </ >
105
+ ) ,
106
+ } ,
107
+ } ,
108
+ } ;
You can’t perform that action at this time.
0 commit comments