Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate BranchName to TypeScript #974

Merged
merged 5 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sharp-pugs-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/components": patch
---

Migrate `BranchName` to TypeScript
7 changes: 4 additions & 3 deletions src/BranchName.js → src/BranchName.tsx
Original file line number Diff line number Diff line change
@@ -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<SystemCommonProps & SxProp>`
display: inline-block;
padding: 2px 6px;
font-size: ${get('fontSizes.0')};
Expand All @@ -27,4 +27,5 @@ BranchName.propTypes = {
theme: PropTypes.object
}

export type BranchNameProps = React.ComponentProps<typeof BranchName>
export default BranchName
File renamed without changes.