From 23b9693a71aaf4808e14c6488e06a7e2938f90a8 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Wed, 20 Jan 2021 09:16:02 -0800 Subject: [PATCH 1/4] =?UTF-8?q?BranchName.js=20=E2=86=92=20BranchName.tsx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/{BranchName.js => BranchName.tsx} | 7 ++++--- src/__tests__/{BranchName.js => BranchName.tsx} | 0 2 files changed, 4 insertions(+), 3 deletions(-) rename src/{BranchName.js => BranchName.tsx} (70%) rename src/__tests__/{BranchName.js => BranchName.tsx} (100%) diff --git a/src/BranchName.js b/src/BranchName.tsx similarity index 70% rename from src/BranchName.js rename to src/BranchName.tsx index 3c7b342de40..0cbc095723e 100644 --- a/src/BranchName.js +++ b/src/BranchName.tsx @@ -1,10 +1,10 @@ import PropTypes from 'prop-types' import styled from 'styled-components' -import sx from './sx' +import sx, {SxProp} from './sx' import theme from './theme' -import {COMMON, get} from './constants' +import {COMMON, get, SystemCommonProps} from './constants' -const BranchName = styled.a` +const BranchName = styled.a` display: inline-block; padding: 2px 6px; font-size: ${get('fontSizes.0')}; @@ -27,4 +27,5 @@ BranchName.propTypes = { theme: PropTypes.object } +export type BranchNameProps = React.ComponentProps export default BranchName diff --git a/src/__tests__/BranchName.js b/src/__tests__/BranchName.tsx similarity index 100% rename from src/__tests__/BranchName.js rename to src/__tests__/BranchName.tsx From 7f355b5c2cb1fd166de986524868403ea21585b2 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Wed, 20 Jan 2021 09:30:54 -0800 Subject: [PATCH 2/4] Update branchname snapshot --- .../__snapshots__/{BranchName.js.snap => BranchName.tsx.snap} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/__tests__/__snapshots__/{BranchName.js.snap => BranchName.tsx.snap} (100%) diff --git a/src/__tests__/__snapshots__/BranchName.js.snap b/src/__tests__/__snapshots__/BranchName.tsx.snap similarity index 100% rename from src/__tests__/__snapshots__/BranchName.js.snap rename to src/__tests__/__snapshots__/BranchName.tsx.snap From 0cac00426d4d29c51d9f110f091aac06c49ec054 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Thu, 21 Jan 2021 14:04:01 -0800 Subject: [PATCH 3/4] Add changeset --- .changeset/sharp-pugs-tap.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sharp-pugs-tap.md diff --git a/.changeset/sharp-pugs-tap.md b/.changeset/sharp-pugs-tap.md new file mode 100644 index 00000000000..3a5acbf9e3b --- /dev/null +++ b/.changeset/sharp-pugs-tap.md @@ -0,0 +1,5 @@ +--- +"@primer/components": patch +--- + +Migrate BranchName to TypeScript From efa35998d1a81f3d7c5ab31e8d11c65ad59cb822 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Thu, 21 Jan 2021 14:04:49 -0800 Subject: [PATCH 4/4] Update sharp-pugs-tap.md --- .changeset/sharp-pugs-tap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/sharp-pugs-tap.md b/.changeset/sharp-pugs-tap.md index 3a5acbf9e3b..ec1ae8af2a3 100644 --- a/.changeset/sharp-pugs-tap.md +++ b/.changeset/sharp-pugs-tap.md @@ -2,4 +2,4 @@ "@primer/components": patch --- -Migrate BranchName to TypeScript +Migrate `BranchName` to TypeScript