Skip to content

[Task] Implement the Grid primitive component extending View #43

@soroushm

Description

@soroushm

Task Description ✏️

Implement the Grid primitive component extending View as part of the design system epic #40.
Grid will provide a semantic wrapper with display: grid and support customizable gap, column, and row settings while inheriting all responsive styled-system props from View. This component will serve as a foundation for grid-based layout compositions throughout the system.

Acceptance Criteria ✅

  • Grid component implemented by extending View with display: grid.
  • Supports gap prop with values mapped from the theme spacing scale.
  • Supports all styled-system grid props (gridTemplateColumns, gridTemplateRows, gridColumn, gridRow, etc.).
  • Inherits all styled-system props from View (space, layout, color, border, typography, flexbox, position).
  • Unit tests verify rendering of children, correct grid layout, and gap behavior.
  • Storybook stories demonstrate Grid usage with adjustable gap and grid configurations.
  • No raw CSS values — all spacing, color, and layout derived from theme tokens.
  • Code passes linting, typing, and CI checks.

Dependencies 🔗

Definition of Ready (DoR) 📋

  • Task is independent and scoped to the Grid component.
  • View component is implemented and tested.
  • Theme tokens are available for spacing, color, and layout.
  • Props to be supported by Grid are agreed upon (gap, grid props, and inherited styled-system props).

Definition of Done (DoD) 🏁

  • Grid component extends View and sets default display: grid.
  • gap prop works correctly with theme spacing scale.
  • Grid layout props (gridTemplateColumns, gridTemplateRows, gridColumn, gridRow) behave correctly.
  • Unit tests cover child rendering, grid layout, and gap behavior.
  • Storybook stories demonstrate various grid configurations with adjustable controls.
  • Code reviewed, linted, typed, and passes CI checks.
  • Documentation updated in Storybook for component usage.
  • Component is ready for reuse in layout compositions.

Additional Notes or Resources 📎

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions