diff --git a/.changeset/slimy-rats-mix.md b/.changeset/slimy-rats-mix.md new file mode 100644 index 00000000000..81f5d0e0bfd --- /dev/null +++ b/.changeset/slimy-rats-mix.md @@ -0,0 +1,5 @@ +--- +"@primer/components": patch +--- + +Migrate `Pagehead` to TypeScript diff --git a/src/Pagehead.js b/src/Pagehead.tsx similarity index 68% rename from src/Pagehead.js rename to src/Pagehead.tsx index 963a2e3b149..fc573010d74 100644 --- a/src/Pagehead.js +++ b/src/Pagehead.tsx @@ -1,10 +1,10 @@ import PropTypes from 'prop-types' import styled from 'styled-components' -import {COMMON, get} from './constants' +import {COMMON, get, SystemCommonProps} from './constants' +import sx, {SxProp} from './sx' import theme from './theme' -import sx from './sx' -const Pagehead = styled.div` +const Pagehead = styled.div` position: relative; padding-top: ${get('space.4')}; padding-bottom: ${get('space.4')}; @@ -24,4 +24,5 @@ Pagehead.propTypes = { ...sx.propTypes } +export type PageheadProps = React.ComponentProps export default Pagehead diff --git a/src/__tests__/Pagehead.js b/src/__tests__/Pagehead.tsx similarity index 100% rename from src/__tests__/Pagehead.js rename to src/__tests__/Pagehead.tsx diff --git a/src/__tests__/__snapshots__/Pagehead.js.snap b/src/__tests__/__snapshots__/Pagehead.tsx.snap similarity index 100% rename from src/__tests__/__snapshots__/Pagehead.js.snap rename to src/__tests__/__snapshots__/Pagehead.tsx.snap