You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PrimaryButton.js 838B

123456789101112131415161718192021222324252627282930
  1. import React from "react";
  2. import PropTypes from "prop-types";
  3. import {
  4. PrimaryButtonContainer,
  5. PrimaryButtonStyled,
  6. } from "./PrimaryButton.styled";
  7. export const PrimaryButton = (props) => {
  8. return (
  9. <PrimaryButtonContainer style={props.containerStyle} className={props.className}>
  10. <PrimaryButtonStyled {...props} sx={props.style}>
  11. {props.children}
  12. </PrimaryButtonStyled>
  13. </PrimaryButtonContainer>
  14. );
  15. };
  16. PrimaryButton.propTypes = {
  17. children: PropTypes.node,
  18. type: PropTypes.oneOf(["button", "reset", "submit"]),
  19. variant: PropTypes.oneOf(["contained", "outlined", "text"]),
  20. style: PropTypes.any,
  21. containerStyle: PropTypes.any,
  22. fullWidth: PropTypes.bool,
  23. buttoncolor: PropTypes.string,
  24. textcolor: PropTypes.string,
  25. className: PropTypes.string,
  26. onClick: PropTypes.func,
  27. };