Skip to content

Commit

Permalink
chore: always use relative paths when import types
Browse files Browse the repository at this point in the history
  • Loading branch information
unix committed Jun 5, 2021
1 parent cde3f9f commit cac21ca
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion components/badge/badge.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useMemo } from 'react'
import useTheme from '../use-theme'
import { NormalSizes, NormalTypes } from '../utils/prop-types'
import { GeistUIThemesPalette } from 'components/themes/presets'
import { GeistUIThemesPalette } from '../themes/presets'
import BadgeAnchor from './badge-anchor'

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion components/button-group/button-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import useTheme from '../use-theme'
import withDefaults from '../utils/with-defaults'
import { NormalSizes, ButtonTypes } from '../utils/prop-types'
import { ButtonGroupContext, ButtonGroupConfig } from './button-group-context'
import { GeistUIThemesPalette } from 'components/themes/presets'
import { GeistUIThemesPalette } from '../themes/presets'

interface Props {
disabled?: boolean
Expand Down
4 changes: 2 additions & 2 deletions components/button/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { ReactNode } from 'react'
import { NormalSizes } from '../utils/prop-types'
import ButtonIcon from './button-icon'
import { ButtonProps } from 'components/button/button'
import { ButtonGroupConfig } from 'components/button-group/button-group-context'
import { ButtonProps } from './button'
import { ButtonGroupConfig } from '../button-group/button-group-context'

export const getButtonChildrenWithIcon = (
auto: boolean,
Expand Down
4 changes: 2 additions & 2 deletions components/checkbox/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GeistUIThemesPalette } from 'components/themes/presets'
import { NormalTypes } from 'components/utils/prop-types'
import { GeistUIThemesPalette } from '../themes/presets'
import { NormalTypes } from '../utils/prop-types'

export type CheckboxColor = {
fill: string
Expand Down
2 changes: 1 addition & 1 deletion components/divider/divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import useTheme from '../use-theme'
import withDefaults from '../utils/with-defaults'
import { DividerAlign, SnippetTypes } from '../utils/prop-types'
import { getMargin } from '../spacer/spacer'
import { GeistUIThemesPalette } from 'components/themes/presets'
import { GeistUIThemesPalette } from '../themes/presets'

export type DividerTypes = SnippetTypes

Expand Down
2 changes: 1 addition & 1 deletion components/image/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GeistUIThemesPalette } from 'components/themes/presets'
import { GeistUIThemesPalette } from '../themes/presets'

export type BrowserColors = {
color: string
Expand Down
2 changes: 1 addition & 1 deletion components/input/input-props.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { NormalSizes, NormalTypes } from 'components/utils/prop-types'
import { NormalSizes, NormalTypes } from '../utils/prop-types'

export interface Props {
value?: string
Expand Down
4 changes: 2 additions & 2 deletions components/loading/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useMemo } from 'react'
import useTheme from '../use-theme'
import withDefaults from '../utils/with-defaults'
import { NormalSizes, NormalTypes } from 'components/utils/prop-types'
import { GeistUIThemesPalette } from 'components/themes/presets'
import { NormalSizes, NormalTypes } from '../utils/prop-types'
import { GeistUIThemesPalette } from '../themes/presets'

type LoadingSizes = NormalSizes | string

Expand Down
4 changes: 2 additions & 2 deletions components/progress/progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import withDefaults from '../utils/with-defaults'
import useTheme from '../use-theme'
import { useProportions } from '../utils/calculations'
import { GeistUIThemesPalette } from 'components/themes/presets'
import { NormalTypes } from 'components/utils/prop-types'
import { GeistUIThemesPalette } from '../themes/presets'
import { NormalTypes } from '../utils/prop-types'

export type ProgressColors = {
[key: number]: string
Expand Down
2 changes: 1 addition & 1 deletion components/radio/radio-group.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useMemo, useState } from 'react'
import withDefaults from '../utils/with-defaults'
import { RadioContext } from './radio-context'
import { NormalSizes } from 'components/utils/prop-types'
import { NormalSizes } from '../utils/prop-types'

interface Props {
value?: string | number
Expand Down
4 changes: 2 additions & 2 deletions components/radio/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GeistUIThemesPalette } from 'components/themes/presets'
import { NormalTypes } from 'components/utils/prop-types'
import { GeistUIThemesPalette } from '../themes/presets'
import { NormalTypes } from '../utils/prop-types'

export type RadioColor = {
label: string
Expand Down
4 changes: 2 additions & 2 deletions components/select/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NormalSizes, NormalTypes } from 'components/utils/prop-types'
import { GeistUIThemes, GeistUIThemesPalette } from 'components/themes/presets'
import { NormalSizes, NormalTypes } from '../utils/prop-types'
import { GeistUIThemes, GeistUIThemesPalette } from '../themes/presets'

export interface SelectSize {
height: string
Expand Down
2 changes: 1 addition & 1 deletion components/slider/slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import useCurrentState from '../utils/use-current-state'
import SliderDot from './slider-dot'
import SliderMark from './slider-mark'
import { getColors } from './styles'
import { NormalTypes } from 'components/utils/prop-types'
import { NormalTypes } from '../utils/prop-types'

interface Props {
hideValue?: boolean
Expand Down
4 changes: 2 additions & 2 deletions components/slider/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GeistUIThemesPalette } from 'components/themes/presets'
import { NormalTypes } from 'components/utils/prop-types'
import { GeistUIThemesPalette } from '../themes/presets'
import { NormalTypes } from '../utils/prop-types'

export type SelectColor = {
bg: string
Expand Down
4 changes: 2 additions & 2 deletions components/snippet/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SnippetTypes } from 'components/utils/prop-types'
import { GeistUIThemesPalette } from 'components/themes/presets'
import { SnippetTypes } from '../utils/prop-types'
import { GeistUIThemesPalette } from '../themes/presets'

export type SnippetStyles = {
color: string
Expand Down
6 changes: 3 additions & 3 deletions components/table/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { mount } from 'enzyme'
import { Table, Code } from 'components'
import { cellActions } from 'components/table/table-cell'
import { TableCellActions } from '../table-cell'
import { nativeEvent, updateWrapper } from 'tests/utils'
import { act } from 'react-dom/test-utils'

Expand Down Expand Up @@ -100,7 +100,7 @@ describe('Table', () => {
})

it('should be possible to remove the row', () => {
const operation = (actions: cellActions) => {
const operation = (actions: TableCellActions) => {
return <button onClick={() => actions.remove()}>Remove</button>
}
const data = [{ property: 'bold', description: 'boolean', operation }]
Expand All @@ -118,7 +118,7 @@ describe('Table', () => {
})

it('should be possible to update the row', () => {
const operation = (actions: cellActions) => {
const operation = (actions: TableCellActions) => {
return (
<button
onClick={() =>
Expand Down
4 changes: 2 additions & 2 deletions components/toggle/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GeistUIThemesPalette } from 'components/themes/presets'
import { NormalTypes } from 'components/utils/prop-types'
import { GeistUIThemesPalette } from '../themes/presets'
import { NormalTypes } from '../utils/prop-types'

export type SelectColor = {
bg: string
Expand Down
2 changes: 1 addition & 1 deletion components/tree/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { mount } from 'enzyme'
import { Tree } from 'components'
import { nativeEvent } from 'tests/utils'
import { FileTreeValue } from 'components/tree/tree'
import { FileTreeValue } from '../tree'

const mockFiles: Array<FileTreeValue> = [
{
Expand Down

0 comments on commit cac21ca

Please sign in to comment.