Commit 6cac9a62 authored by Verónica Silva's avatar Verónica Silva

Customizing width of ContactButton

parent b4a87eea
...@@ -5,16 +5,17 @@ const theme = createTheme({ ...@@ -5,16 +5,17 @@ const theme = createTheme({
palette: { palette: {
primary: { primary: {
main: "#074B6B", main: "#074B6B",
light: lightBlue[900], light: "#437799",
dark: "#07415C", dark: "#002340",
contrastText: "#fff", contrastText: "#fff",
text: "#404040", text: "#404040",
}, },
secondary: { secondary: {
main: cyan[400], main: "#26c6da",
light: cyan[300], light: "#6ff9ff",
dark: cyan[700], dark: "#0095a8",
contrastText: "#fff", contrastText: "#fff",
text: "#002340"
}, },
} }
}) })
......
...@@ -6,12 +6,12 @@ import { styled } from "@mui/material/styles" ...@@ -6,12 +6,12 @@ import { styled } from "@mui/material/styles"
import Button from "@mui/material/Button" import Button from "@mui/material/Button"
import ArrowForwardIosRoundedIcon from "@mui/icons-material/ArrowForwardIosRounded" import ArrowForwardIosRoundedIcon from "@mui/icons-material/ArrowForwardIosRounded"
import theme from "./palette" import theme from "../assets/styles/myTheme"
const myPalette = theme.palette const myPalette = theme.palette
const CustomButton = styled(Button)(({ theme }) => ({ const CustomButton = styled(Button)(({ theme }) => ({
color: `${myPalette.secondary.contrastText} !important`, color: `${myPalette.secondary.text} !important`,
backgroundColor: `${myPalette.secondary.main} !important`, backgroundColor: `${myPalette.secondary.main} !important`,
paddingTop: "5px !important", paddingTop: "5px !important",
paddingBottom: "5px !important", paddingBottom: "5px !important",
...@@ -22,16 +22,16 @@ const CustomButton = styled(Button)(({ theme }) => ({ ...@@ -22,16 +22,16 @@ const CustomButton = styled(Button)(({ theme }) => ({
})) }))
ContactButton.propTypes = { ContactButton.propTypes = {
children: PropTypes.element.isRequired, children: PropTypes.string.isRequired,
width: PropTypes.string,
} }
function ContactButton({ children }) { function ContactButton({ children, width }) {
return ( return (
<CustomButton <CustomButton
variant="contained" variant="contained"
type="submit" type="submit"
fullWidth sx={{ mt: 1, mb: 2, width: width }}
sx={{ mt: 1, mb: 2 }}
endIcon={<ArrowForwardIosRoundedIcon />} endIcon={<ArrowForwardIosRoundedIcon />}
> >
{ children } { children }
......
...@@ -84,8 +84,8 @@ function FormFooter() { ...@@ -84,8 +84,8 @@ function FormFooter() {
style: { color: myPalette.primary.contrastText}, style: { color: myPalette.primary.contrastText},
}} }}
/> />
<ContactButton> <ContactButton width="100%">
Contactar Contáctanos
</ContactButton> </ContactButton>
</Box> </Box>
) )
......
...@@ -20,7 +20,6 @@ const useStyles = makeStyles((theme) => ({ ...@@ -20,7 +20,6 @@ const useStyles = makeStyles((theme) => ({
flexDirection: "column", flexDirection: "column",
justifyContent: "center", justifyContent: "center",
alignItems: "flex-end", alignItems: "flex-end",
color: "#ffffff",
backgroundImage: `url(${HeroBg})`, backgroundImage: `url(${HeroBg})`,
position: "relative", position: "relative",
backgroundSize: "cover", backgroundSize: "cover",
...@@ -44,13 +43,14 @@ function Banner() { ...@@ -44,13 +43,14 @@ function Banner() {
align="right" align="right"
sx={{ sx={{
width: "50%", width: "50%",
mb: 4 mb: 4,
color: "#ffffff"
}} }}
> >
Ayudamos a que las Empresas operen <span className={classes.highlighter}>digitalmente</span>, cumplan con las regulaciones, y <span className={classes.highlighter}>crezcan</span> sin aumentar personal Ayudamos a que las Empresas operen <span className={classes.highlighter}>digitalmente</span>, cumplan con las regulaciones, y <span className={classes.highlighter}>crezcan</span> sin aumentar personal
</Typography> </Typography>
<ContactButton> <ContactButton width="180px">
Contactar Contáctanos
</ContactButton> </ContactButton>
</Box> </Box>
</> </>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment