From f16bf7b021173fbf8b7a186215daea72fb7e5f80 Mon Sep 17 00:00:00 2001
From: Ariya Hidayat <ariya@metabase.com>
Date: Fri, 27 Aug 2021 23:13:54 -0700
Subject: [PATCH] GridItem should not use prop shorthand (#17610)

---
 .../src/metabase/collections/components/BulkActions.jsx     | 4 ++--
 frontend/src/metabase/components/CollectionList.jsx         | 2 +-
 frontend/src/metabase/components/ExplorePane.jsx            | 2 +-
 frontend/src/metabase/components/Grid.jsx                   | 6 +++---
 frontend/src/metabase/containers/Overworld.jsx              | 4 ++--
 frontend/src/metabase/containers/UserCollectionList.jsx     | 2 +-
 .../src/metabase/new_query/containers/NewQueryOptions.jsx   | 6 +++---
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/frontend/src/metabase/collections/components/BulkActions.jsx b/frontend/src/metabase/collections/components/BulkActions.jsx
index 739c6fdc8c1..ab07db12f6a 100644
--- a/frontend/src/metabase/collections/components/BulkActions.jsx
+++ b/frontend/src/metabase/collections/components/BulkActions.jsx
@@ -66,8 +66,8 @@ function BulkActions(props) {
                    to the main content above to ensure the bulk checkbox lines up */}
       <Box px={[2, 4]} py={1}>
         <Grid>
-          <GridItem w={[1, 1 / 3]} />
-          <GridItem w={[1, 2 / 3]} px={[1, 2]}>
+          <GridItem width={[1, 1 / 3]} />
+          <GridItem width={[1, 2 / 3]} px={[1, 2]}>
             <Flex align="center" justify="center" px={2}>
               <SelectionControls {...props} />
               <BulkActionControls
diff --git a/frontend/src/metabase/components/CollectionList.jsx b/frontend/src/metabase/components/CollectionList.jsx
index 05d6a56810f..b0406da76ca 100644
--- a/frontend/src/metabase/components/CollectionList.jsx
+++ b/frontend/src/metabase/components/CollectionList.jsx
@@ -33,7 +33,7 @@ function CollectionList({
       {collections
         .filter(c => c.id !== currentUser.personal_collection_id)
         .map(collection => (
-          <GridItem w={w} key={collection.id}>
+          <GridItem width={w} key={collection.id}>
             <CollectionItem
               collection={collection}
               event={`${analyticsContext};Collection List;Collection click`}
diff --git a/frontend/src/metabase/components/ExplorePane.jsx b/frontend/src/metabase/components/ExplorePane.jsx
index eeda7157a7a..080698f62e2 100644
--- a/frontend/src/metabase/components/ExplorePane.jsx
+++ b/frontend/src/metabase/components/ExplorePane.jsx
@@ -139,7 +139,7 @@ export const ExploreList = ({
   <Grid>
     {candidates &&
       candidates.map((option, index) => (
-        <GridItem w={gridColumns} key={index}>
+        <GridItem width={gridColumns} key={index}>
           {asCards ? (
             <Card hoverable p={2}>
               <ExploreOption option={option} />
diff --git a/frontend/src/metabase/components/Grid.jsx b/frontend/src/metabase/components/Grid.jsx
index 5839ab83d25..aca62286afe 100644
--- a/frontend/src/metabase/components/Grid.jsx
+++ b/frontend/src/metabase/components/Grid.jsx
@@ -2,14 +2,14 @@
 import React from "react";
 import { Box, Flex } from "grid-styled";
 
-export const GridItem = ({ children, w, px, py, ...props }) => (
-  <Box px={px} py={py} {...props} width={w}>
+export const GridItem = ({ children, width, px, py, ...props }) => (
+  <Box px={px} py={py} {...props} width={width}>
     {children}
   </Box>
 );
 
 GridItem.defaultProps = {
-  w: 1 / 4,
+  width: 1 / 4,
   px: 1,
   py: 1,
 };
diff --git a/frontend/src/metabase/containers/Overworld.jsx b/frontend/src/metabase/containers/Overworld.jsx
index 47c6fe9473a..ff1f0caeb72 100644
--- a/frontend/src/metabase/containers/Overworld.jsx
+++ b/frontend/src/metabase/containers/Overworld.jsx
@@ -164,7 +164,7 @@ class Overworld extends React.Component {
                   {items.map(pin => {
                     return (
                       <GridItem
-                        w={[1, 1 / 2, 1 / 3]}
+                        width={[1, 1 / 2, 1 / 3]}
                         key={`${pin.model}-${pin.id}`}
                       >
                         <Link
@@ -288,7 +288,7 @@ class Overworld extends React.Component {
                   <Box mb={4}>
                     <Grid>
                       {databases.map(database => (
-                        <GridItem w={[1, 1 / 3]} key={database.id}>
+                        <GridItem width={[1, 1 / 3]} key={database.id}>
                           <Link
                             to={Urls.browseDatabase(database)}
                             hover={{ color: color("brand") }}
diff --git a/frontend/src/metabase/containers/UserCollectionList.jsx b/frontend/src/metabase/containers/UserCollectionList.jsx
index 924c8cce6d8..90ada9f482d 100644
--- a/frontend/src/metabase/containers/UserCollectionList.jsx
+++ b/frontend/src/metabase/containers/UserCollectionList.jsx
@@ -44,7 +44,7 @@ const UserCollectionList = ({ collectionsById }) => (
               list.map(
                 user =>
                   user.personal_collection_id && (
-                    <GridItem w={1 / 3} key={user.personal_collection_id}>
+                    <GridItem width={1 / 3} key={user.personal_collection_id}>
                       <Link
                         to={Urls.collection(
                           collectionsById[user.personal_collection_id],
diff --git a/frontend/src/metabase/new_query/containers/NewQueryOptions.jsx b/frontend/src/metabase/new_query/containers/NewQueryOptions.jsx
index 87032a1e767..11ac6c62d24 100644
--- a/frontend/src/metabase/new_query/containers/NewQueryOptions.jsx
+++ b/frontend/src/metabase/new_query/containers/NewQueryOptions.jsx
@@ -83,7 +83,7 @@ export default class NewQueryOptions extends Component {
       <Box my="auto" mx={PAGE_PADDING}>
         <Grid className="justifyCenter">
           {hasDataAccess && (
-            <GridItem w={ITEM_WIDTHS}>
+            <GridItem width={ITEM_WIDTHS}>
               <NewQueryOption
                 image="app/img/simple_mode_illustration"
                 title={t`Simple question`}
@@ -95,7 +95,7 @@ export default class NewQueryOptions extends Component {
             </GridItem>
           )}
           {hasDataAccess && (
-            <GridItem w={ITEM_WIDTHS}>
+            <GridItem width={ITEM_WIDTHS}>
               <NewQueryOption
                 image="app/img/notebook_mode_illustration"
                 title={t`Custom question`}
@@ -107,7 +107,7 @@ export default class NewQueryOptions extends Component {
             </GridItem>
           )}
           {hasNativeWrite && (
-            <GridItem w={ITEM_WIDTHS}>
+            <GridItem width={ITEM_WIDTHS}>
               <NewQueryOption
                 image="app/img/sql_illustration"
                 title={t`Native query`}
-- 
GitLab