Update primary button style

This commit is contained in:
delivan 2022-12-18 17:59:29 +09:00
parent 68d8ba31aa
commit 7e72ab82b6

View File

@ -1,7 +1,18 @@
import { ButtonHTMLAttributes, FunctionComponent } from "react";
import styled from "styled-components";
import color from "../../styles/color";
export const PrimaryButton = styled.button`
export const PrimaryButton: FunctionComponent<
ButtonHTMLAttributes<HTMLButtonElement>
> = ({ children, ...props }) => {
return (
<StyledPrimaryButton {...props}>
<span>{children}</span>
</StyledPrimaryButton>
);
};
const StyledPrimaryButton = styled.button`
width: 100%;
height: 100%;
@ -17,7 +28,6 @@ export const PrimaryButton = styled.button`
letter-spacing: 0.07em;
text-transform: uppercase;
color: ${color.orange["50"]};
background-color: ${color.orange["100"]};
cursor: pointer;
@ -25,11 +35,22 @@ export const PrimaryButton = styled.button`
&:hover {
transition-duration: 0.5s;
background-color: ${color.orange["200"]};
span {
opacity: 0.5;
}
}
&:disabled {
opacity: 0.5;
background-color: ${color.orange["300"]};
span {
opacity: 0.5;
}
}
span {
transition-duration: 0.5s;
color: ${color.orange["50"]};
}
`;