I have a CustomButton component I want to be able to reuse throughout my app. If I want to use it as a submit button for a contact form, am I able to just use it like this, <CustomButton type='submit'>Submit</CustomButton> or do I have to pass in the type as props somehow? that way if I use the button for something else like linking to a github repo I can change it.
This is my CustomButton component as of now.
import React from 'react'
import { css } from '@emotion/core'
import { COLORS } from '../constants'
const CustomButton = ({ children }) => {
return (
<button
css={css`
color: ${COLORS.primaryTextColor};
font-size: 1rem;
width: 125px;
height: 50px;
background: none;
border: 2px solid ${COLORS.secondaryTextColor};
border-radius: 5px;
cursor: pointer;
`}
>
{children}
</button>
)
}
export default CustomButton