Skip to content

Commit

Permalink
Reorganize Header component file
Browse files Browse the repository at this point in the history
  • Loading branch information
VanAnderson committed Feb 5, 2021
1 parent 1134081 commit e3732f6
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,8 @@ const HeaderItem = styled.div<StyledHeaderItemProps>`
${BORDER};
${sx};
`
HeaderItem.displayName = 'Header.Item'

HeaderItem.defaultProps = {
theme
}

HeaderItem.propTypes = {
full: PropTypes.bool,
...COMMON.propTypes,
...BORDER.propTypes,
...sx.propTypes
}
HeaderItem.displayName = 'Header.Item'

const HeaderLink = styled.a.attrs(({to}: StyledHeaderLinkProps) => {
const isReactRouter = typeof to === 'string'
Expand Down Expand Up @@ -81,9 +71,27 @@ const HeaderLink = styled.a.attrs(({to}: StyledHeaderLinkProps) => {
${TYPOGRAPHY};
${sx};
`

HeaderLink.displayName = 'Header.Link'

HeaderLink.defaultProps = {
Header.propTypes = {
...sx.propTypes,
...COMMON.propTypes,
...BORDER.propTypes
}

Header.defaultProps = {
theme
}

HeaderItem.propTypes = {
full: PropTypes.bool,
...COMMON.propTypes,
...BORDER.propTypes,
...sx.propTypes
}

HeaderItem.defaultProps = {
theme
}

Expand All @@ -96,13 +104,7 @@ HeaderLink.propTypes = {
...sx.propTypes
}

Header.propTypes = {
...sx.propTypes,
...COMMON.propTypes,
...BORDER.propTypes
}

Header.defaultProps = {
HeaderLink.defaultProps = {
theme
}

Expand Down

0 comments on commit e3732f6

Please sign in to comment.