score:4

Accepted answer
interface Props {
  btnTitle?: string,
  children: any,
  className?: string,
  id?: string,
  onClick: React.MouseEventHandler<HTMLButtonElement>,
}

const BigButton = styled.button`
  .... base styles ....
`;

const DiscoverButton: React.FC<Props> = ({ children, className, onClick }) => (
  <BigButton
    className={className}
    onClick={(...args) => {
      console.log("Did something with the props");
      onClick(...args);
    }}
  >
    {children}
  </BigButton>
);

const ReturnButton: React.FC<Props> = styled(DiscoverButton)`
  width: 7%;
`;

Related Query

More Query from same tag