From 1519738c9dcd6e7bc23649751766e18683323f76 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Tue, 26 Jan 2021 16:25:17 -0800 Subject: [PATCH 1/2] =?UTF-8?q?Grid.js=20=E2=86=92=20Grid.tsx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/{Grid.js => Grid.tsx} | 8 +++++--- src/__tests__/{Grid.js => Grid.tsx} | 0 .../__snapshots__/{Grid.js.snap => Grid.tsx.snap} | 0 3 files changed, 5 insertions(+), 3 deletions(-) rename src/{Grid.js => Grid.tsx} (55%) rename src/__tests__/{Grid.js => Grid.tsx} (100%) rename src/__tests__/__snapshots__/{Grid.js.snap => Grid.tsx.snap} (100%) diff --git a/src/Grid.js b/src/Grid.tsx similarity index 55% rename from src/Grid.js rename to src/Grid.tsx index c023334ab0e..349c3a57711 100644 --- a/src/Grid.js +++ b/src/Grid.tsx @@ -1,9 +1,10 @@ import styled from 'styled-components' -import {GRID} from './constants' -import theme from './theme' import Box from './Box' +import {GRID, SystemGridProps} from './constants' +import theme from './theme' +import {ComponentProps} from './utils/types' -const Grid = styled(Box)` +const Grid = styled(Box)` ${GRID}; ` @@ -17,4 +18,5 @@ Grid.propTypes = { ...GRID.propTypes } +export type GridProps = ComponentProps export default Grid diff --git a/src/__tests__/Grid.js b/src/__tests__/Grid.tsx similarity index 100% rename from src/__tests__/Grid.js rename to src/__tests__/Grid.tsx diff --git a/src/__tests__/__snapshots__/Grid.js.snap b/src/__tests__/__snapshots__/Grid.tsx.snap similarity index 100% rename from src/__tests__/__snapshots__/Grid.js.snap rename to src/__tests__/__snapshots__/Grid.tsx.snap From 34ff4885311686699fbb6d2e3fab0337bad3d016 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Wed, 27 Jan 2021 10:50:50 -0800 Subject: [PATCH 2/2] Add changeset --- .changeset/tricky-gifts-bake.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tricky-gifts-bake.md diff --git a/.changeset/tricky-gifts-bake.md b/.changeset/tricky-gifts-bake.md new file mode 100644 index 00000000000..c6e4fc812da --- /dev/null +++ b/.changeset/tricky-gifts-bake.md @@ -0,0 +1,5 @@ +--- +"@primer/components": patch +--- + +Migrate `Grid` to TypeScript