Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
gustaveen committed May 4, 2022
1 parent 4950000 commit efa9664
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/Perils/PerilList/PerilList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PerilItem } from 'components/Perils/PerilItem/PerilItem'
import { minimalColorComponentColors } from 'src/blocks/BaseBlockProps'
import { Peril } from '../types'

interface Props {
type Props = {
color: minimalColorComponentColors
perils: ReadonlyArray<Peril>
setCurrentPeril: (index: number) => void
Expand Down Expand Up @@ -40,12 +40,12 @@ const Wrapper = styled.div`
}
`

export const PerilList: React.FC<Props> = ({
export const PerilList = ({
color,
perils,
setCurrentPeril,
setIsShowingPeril,
}) => (
}: Props) => (
<Wrapper>
{perils.map((peril, perilIndex) => (
<PerilItem
Expand Down
10 changes: 5 additions & 5 deletions src/components/Perils/types.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { ReactNode } from 'react'

interface IconVariant {
type IconVariant = {
svgUrl: string
}

interface IconVariants {
type IconVariants = {
dark: IconVariant
light: IconVariant
}

export interface PerilIcon {
export type PerilIcon = {
variants: IconVariants
}

export interface Peril {
export type Peril = {
title: ReactNode
description?: string
covered: string[]
Expand All @@ -22,7 +22,7 @@ export interface Peril {
icon: PerilIcon
}

export interface PerilsCollection {
export type PerilsCollection = {
id: string
label: string
items: Peril[]
Expand Down

0 comments on commit efa9664

Please sign in to comment.