Skip to content

Commit

Permalink
refactor(accordion): migrate component from js to tsx
Browse files Browse the repository at this point in the history
add typed props and style for the accordion and switch from
js file to typescript react component

Refs: ethereum#6392
  • Loading branch information
Mousticke committed Jun 3, 2022
1 parent f3efc79 commit e13c0f3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/Accordion.js → src/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,18 @@ const StyledEmoji = styled(Emoji)`
}
`

const StablecoinAccordion = ({ children, contentPreview, title, emoji }) => {
export interface IProps {
contentPreview: string
title: string
emoji: string
}

const StablecoinAccordion: React.FC<IProps> = ({
children,
contentPreview,
title,
emoji,
}) => {
const [isVisible, setIsVisible] = useState(false)
return (
<Card>
Expand Down

0 comments on commit e13c0f3

Please sign in to comment.