Spaces:
Running
Running
File size: 1,155 Bytes
ce8c232 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | import styled from 'styled-components';
const Button=styled.button`
border: ${props => props.borderColor ? `2px solid ${props.borderColor}` : 'none'};
color: ${props => props.color} ;
background-color: ${(props)=> props.bg || "white" };
${ props=> props.shadow ? `box-shadow: 1px 1px 5px ${props.shadow}` : "" };
font-weight: bold;
text-decoration: none;
padding:8px 11px;
border-radius: 12px;
transition: ease-in-out 0.3s;
&:hover{
background-color: ${(props)=> props.bg || "white"};
transform: scale(1.05);
z-index:1
}
&:active{
background-color: ${(props)=> props.bg};
transform: scale(0.95);
z-index:1;
transition: ease-in-out 0.08s;
}
&:disabled{
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
}
`;
Button.defaultProps = {
bg: "pink",
color : "#a80471",
}
export const ButtonD=styled(Button)`
`;
ButtonD.defaultProps={
bg: "aliceblue",
color : "#ae0378",
}
export default Button; |