40 lines
659 B
TypeScript
40 lines
659 B
TypeScript
import React from 'react';
|
|
import { Box, Heading } from 'grommet';
|
|
|
|
export const Other = ({
|
|
image,
|
|
name,
|
|
handleClick,
|
|
}: {
|
|
image: string;
|
|
name: string;
|
|
handleClick: ((...args: any[]) => any) & ((event: MouseEvent) => void);
|
|
}) => {
|
|
return (
|
|
<Box
|
|
round='xxsmall'
|
|
overflow='hidden'
|
|
align='center'
|
|
pad='small'
|
|
onClick={handleClick}
|
|
>
|
|
<Heading
|
|
level='4'
|
|
margin={{ bottom: 'small', top: 'small', left: 'small' }}
|
|
>
|
|
{name}
|
|
</Heading>
|
|
<Box
|
|
height='small'
|
|
width='small'
|
|
round='full'
|
|
background={{
|
|
repeat: 'no-repeat',
|
|
size: 'cover',
|
|
image: `url(${image})`,
|
|
}}
|
|
/>
|
|
</Box>
|
|
);
|
|
};
|