Skip to content

Grid does not work properly in react native expo #2794

Closed
@Alireza-Iranpour

Description

@Alireza-Iranpour

Description

The columns are not respected

CodeSandbox/Snack link

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

gluestack-ui Version

latest

Platform

  • Expo
  • React Native CLI
  • Next
  • Web
  • Android
  • iOS

Other Platform

No response

Additional Information

import { Grid, GridItem } from "@/components/ui/grid";
import { Text } from "@/components/ui/text";

export default function Example() {
  return (
    <Grid
      className="gap-y-2 gap-x-4 p-5"
      _extra={{
        className: "grid-cols-6",
      }}
    >
      <GridItem
        className="bg-background-50 p-4 rounded-md text-center"
        _extra={{
          className: "col-span-2",
        }}
      >
        <Text className="text-sm">01</Text>
      </GridItem>
      <GridItem
        className="bg-background-50 p-4 rounded-md text-center"
        _extra={{
          className: "col-span-2",
        }}
      >
        <Text className="text-sm">02</Text>
      </GridItem>
      <GridItem
        className="bg-background-50 p-4 rounded-md text-center"
        _extra={{
          className: "col-span-2",
        }}
      >
        <Text className="text-sm">03</Text>
      </GridItem>
      <GridItem
        className="bg-background-50 p-4 rounded-md text-center"
        _extra={{
          className: "col-span-2",
        }}
      >
        <Text className="text-sm">04</Text>
      </GridItem>
      <GridItem
        className="bg-background-50 p-4 rounded-md text-center"
        _extra={{
          className: "col-span-2",
        }}
      >
        <Text className="text-sm">05</Text>
      </GridItem>
      <GridItem
        className="bg-background-50 p-4 rounded-md text-center"
        _extra={{
          className: "col-span-2",
        }}
      >
        <Text className="text-sm">06</Text>
      </GridItem>
    </Grid>
  );
}

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions