@@ -46,13 +46,13 @@ storiesOf('Features/Fixed Column', module)
46
46
}
47
47
48
48
&:nth-of-type(3) {
49
- min-width: 20 %;
50
- width: 20 %;
49
+ min-width: 50 %;
50
+ width: 50 %;
51
51
}
52
52
53
53
&:nth-of-type(4), &:nth-of-type(5) {
54
- min-width: 700px ;
55
- width: 700px ;
54
+ min-width: 25% ;
55
+ width: 25% ;
56
56
}
57
57
` ,
58
58
} ) ;
@@ -93,6 +93,82 @@ storiesOf('Features/Fixed Column', module)
93
93
</ Table >
94
94
) ;
95
95
} )
96
+ . add ( 'fixed right-side' , ( ) => {
97
+ const data = { nodes } ;
98
+
99
+ const theme = useTheme ( {
100
+ BaseCell : `
101
+ &:nth-of-type(1) {
102
+ left: 0px;
103
+
104
+ min-width: 250px;
105
+ width: 250px;
106
+ }
107
+
108
+ &:nth-of-type(2) {
109
+ min-width: 50%;
110
+ width: 50%;
111
+ }
112
+
113
+ &:nth-of-type(3) {
114
+ min-width: 250px;
115
+ width: 250px;
116
+ }
117
+
118
+ &:nth-of-type(4) {
119
+ min-width: 50%;
120
+ width: 50%;
121
+
122
+ border-right: 1px solid transparent;
123
+ }
124
+
125
+ &:nth-of-type(5) {
126
+ right: 0;
127
+
128
+ min-width: 250px;
129
+ width: 250px;
130
+
131
+ border-left: 1px solid #a0a8ae;
132
+ }
133
+ ` ,
134
+ } ) ;
135
+
136
+ return (
137
+ < Table data = { data } theme = { theme } layout = { { custom : true , horizontalScroll : true } } >
138
+ { ( tableList ) => (
139
+ < >
140
+ < Header >
141
+ < HeaderRow >
142
+ < HeaderCell pin > Task</ HeaderCell >
143
+ < HeaderCell > Deadline</ HeaderCell >
144
+ < HeaderCell > Type</ HeaderCell >
145
+ < HeaderCell > Complete</ HeaderCell >
146
+ < HeaderCell pin > Tasks</ HeaderCell >
147
+ </ HeaderRow >
148
+ </ Header >
149
+
150
+ < Body >
151
+ { tableList . map ( ( item ) => (
152
+ < Row key = { item . id } item = { item } >
153
+ < Cell pin > { item . name } </ Cell >
154
+ < Cell >
155
+ { item . deadline . toLocaleDateString ( 'en-US' , {
156
+ year : 'numeric' ,
157
+ month : '2-digit' ,
158
+ day : '2-digit' ,
159
+ } ) }
160
+ </ Cell >
161
+ < Cell > { item . type } </ Cell >
162
+ < Cell > { item . isComplete . toString ( ) } </ Cell >
163
+ < Cell pin > { item . nodes ?. length } </ Cell >
164
+ </ Row >
165
+ ) ) }
166
+ </ Body >
167
+ </ >
168
+ ) }
169
+ </ Table >
170
+ ) ;
171
+ } )
96
172
. add ( '+ vertical scroll' , ( ) => {
97
173
const data = { nodes } ;
98
174
@@ -116,13 +192,13 @@ storiesOf('Features/Fixed Column', module)
116
192
}
117
193
118
194
&:nth-of-type(3) {
119
- min-width: 20 %;
120
- width: 20 %;
195
+ min-width: 50 %;
196
+ width: 50 %;
121
197
}
122
198
123
199
&:nth-of-type(4), &:nth-of-type(5) {
124
- min-width: 700px ;
125
- width: 700px ;
200
+ min-width: 25% ;
201
+ width: 25% ;
126
202
}
127
203
` ,
128
204
} ) ;
0 commit comments