import { FunctionComponent } from 'react'; import Image from 'next/image'; import Link from 'next/link'; import styled from 'styled-components'; import DEFAULT_THEME from '../../lib/consts/DEFAULT_THEME'; import Label from './Label'; const DEFAULT_BUTTON_IMAGE_SIZE = 30; const StyledButton = styled.button` display: flex; flex-direction: row; flex-wrap: nowrap; `; const StyledSeparator = styled.div` margin-right: 0.5em; `; StyledButton.defaultProps = { theme: DEFAULT_THEME, }; const getButtonImageElement: ( imageProps?: ButtonImageProps, ) => JSX.Element | undefined = (imageProps) => { let imageElement: JSX.Element | undefined; if (imageProps) { const { src, width = DEFAULT_BUTTON_IMAGE_SIZE, height = DEFAULT_BUTTON_IMAGE_SIZE, } = imageProps; imageElement = ; } return imageElement; }; const getButtonLabelElement: ( labelProps?: LabelProps, ) => JSX.Element | undefined = (labelProps) => { let labelElement: JSX.Element | undefined; if (labelProps) { const { text } = labelProps; labelElement =