Skip to content

Commit b10801c

Browse files
committed
More interface definitions
1 parent f231f2c commit b10801c

File tree

8 files changed

+13
-14
lines changed

8 files changed

+13
-14
lines changed

src/avatar-group.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type Alignment = 'left' | 'right'
5656

5757
type StartValue = 'auto' | number | (number | 'auto')[]
5858

59-
export type AvatarGroupProps = {
59+
export interface AvatarGroupProps extends RowProps, GroupProps {
6060
members: AvatarProps[]
6161
direction?: 'horizontal' | 'vertical'
6262
align?: Alignment | Alignment[]
@@ -65,8 +65,7 @@ export type AvatarGroupProps = {
6565
width?: string
6666
maxWidth?: string | number
6767
fixedCount?: number
68-
} & RowProps &
69-
GroupProps
68+
}
7069

7170
const AvatarGroup = ({
7271
members,

src/column.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { Box, BoxProps, ResponsiveStyleValue } from 'theme-ui'
33

4-
export type ColumnProps = BoxProps & {
4+
export interface ColumnProps extends BoxProps {
55
start?: number | 'auto' | (number | 'auto')[]
66
width?: number | 'auto' | (number | 'auto')[]
77
dl?: 0.5 | 1

src/group.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ type SizeKey = keyof typeof sizes
1414
type Direction = 'horizontal' | 'vertical'
1515
type SpacingValue = SizeKey | ResponsiveStyleValue<number | string>
1616

17-
export type GroupProps = {
17+
export interface GroupProps extends BoxProps {
1818
direction?: Direction
1919
spacing?: SpacingValue
20-
} & BoxProps
20+
}
2121

2222
const Group = ({
2323
children,

src/header.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const sx = {
4242
},
4343
}
4444

45-
export type LinkItem = {
45+
export interface LinkItem {
4646
url: string
4747
display: string
4848
}
@@ -74,7 +74,7 @@ const HoverArrow = (): JSX.Element => {
7474
)
7575
}
7676

77-
export type NavProps = {
77+
export interface NavProps {
7878
link: LinkItem
7979
mode?: 'homepage' | 'local' | 'remote'
8080
nav?: string
@@ -116,7 +116,7 @@ const Nav = ({
116116
}
117117
}
118118

119-
export type NavGroupProps = {
119+
export interface NavGroupProps {
120120
links: LinkItem[]
121121
nav?: string
122122
mode?: 'homepage' | 'local' | 'remote'
@@ -143,7 +143,7 @@ const NavGroup = ({
143143
})
144144
}
145145

146-
export type HeaderProps = {
146+
export interface HeaderProps {
147147
status?: string
148148
mode?: 'homepage' | 'local' | 'remote'
149149
nav?: string

src/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Scrollbar from './scrollbar'
1010
import Guide from './guide'
1111
import Settings, { SettingsProps } from './settings'
1212

13-
export type LayoutProps = {
13+
export interface LayoutProps {
1414
title?: string
1515
description?: string
1616
url?: string

src/link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'
22
import { Link as ThemedLink, LinkProps as ThemedLinkProps } from 'theme-ui'
33
import { default as NextLink } from 'next/link'
44

5-
export type LinkProps = ThemedLinkProps & {
5+
export interface LinkProps extends ThemedLinkProps {
66
href: string
77
internal?: boolean
88
}

src/row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { ReactNode } from 'react'
1+
import React from 'react'
22
import { Grid, GridProps } from 'theme-ui'
33

44
export type RowProps = GridProps

src/settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { IconButton, IconButtonProps } from 'theme-ui'
33

4-
export type SettingsProps = IconButtonProps & {
4+
export interface SettingsProps extends Omit<IconButtonProps, 'value'> {
55
value: boolean
66
}
77

0 commit comments

Comments
 (0)