File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ export const ResponsiveGrid: React.FC<ResponsiveGridProps> = ({
2626 keyExtractor = ( _ , index ) => String ( index ) , // default to item index if no keyExtractor is provided
2727 HeaderComponent = null ,
2828 FooterComponent = null ,
29+ direction = 'ltr' ,
2930} ) => {
31+ const start = direction === 'ltr' ? 'left' : 'right' ;
3032 const [ visibleItems , setVisibleItems ] = useState < TileItem [ ] > ( [ ] ) ;
3133
3234 const [ containerSize , setContainerSize ] = useState ( { width : 0 , height : 0 } ) ;
@@ -158,7 +160,7 @@ export const ResponsiveGrid: React.FC<ResponsiveGridProps> = ({
158160 {
159161 position : 'absolute' ,
160162 top : item . top ,
161- left : item . left ,
163+ [ start ] : item . left ,
162164 width : item . width ,
163165 height : item . height ,
164166 } ,
You can’t perform that action at this time.
0 commit comments