Skip to content

Commit

Permalink
Merge pull request #979 from primer/cb/ts-text
Browse files Browse the repository at this point in the history
Migrate Text to TypeScript
  • Loading branch information
smockle authored Jan 27, 2021
2 parents 8751b43 + 40d7c47 commit 4b71d19
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-snakes-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/components": patch
---

Migrate `Text` to TypeScript
9 changes: 5 additions & 4 deletions src/Text.js → src/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import styled from 'styled-components'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import {COMMON, SystemCommonProps, SystemTypographyProps, TYPOGRAPHY} from './constants'
import sx, {SxProp} from './sx'
import theme from './theme'
import {TYPOGRAPHY, COMMON} from './constants'
import sx from './sx'

const Text = styled.span`
const Text = styled.span<SystemTypographyProps & SystemCommonProps & SxProp>`
${TYPOGRAPHY};
${COMMON};
${sx};
@@ -21,4 +21,5 @@ Text.propTypes = {
theme: PropTypes.object
}

export type TextProps = React.ComponentProps<typeof Text>
export default Text
File renamed without changes.
File renamed without changes.

1 comment on commit 4b71d19

@vercel
Copy link

@vercel vercel bot commented on 4b71d19 Jan 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.