|
@@ -14,7 +14,7 @@ export type ButtonStyleProps = {
|
|
|
const baseStyles: StyleFn = () => ({
|
|
|
borderWidth: "1px",
|
|
|
borderStyle: "solid",
|
|
|
- fontFamily: typography.fonts.base,
|
|
|
+ fontFamily: typography.fonts.headers,
|
|
|
fontWeight: typography.weights.medium,
|
|
|
display: "inline-flex",
|
|
|
justifyContent: "center",
|
|
@@ -90,7 +90,6 @@ const paddingFromType: StyleFn = (
|
|
|
const buttonHeight = size === "regular" ? "20px" : size === "small" ? "15px" : "10px"
|
|
|
return {
|
|
|
...styles,
|
|
|
- margin: `0 ${full ? "0" : "15px"} 0 0`,
|
|
|
padding:
|
|
|
size === "regular"
|
|
|
? children
|
|
@@ -132,139 +131,3 @@ export const useCSS = (props: ButtonStyleProps) => ({
|
|
|
container: makeStyles([baseStyles, colorFromType, dimensionsFromProps, paddingFromType, disabled])(props),
|
|
|
icon: makeStyles([iconStyles])(props)
|
|
|
})
|
|
|
-
|
|
|
-// text,
|
|
|
-// type = "primary",
|
|
|
-// width = "normal",
|
|
|
-// size = "regular",
|
|
|
-// disabled = false,
|
|
|
-// }: ButtonStyleProps) => {
|
|
|
-//
|
|
|
-
|
|
|
-// const primaryButton = {
|
|
|
-// container: css`
|
|
|
-// border: 1px solid ${colors.blue[500]};
|
|
|
-// color: ${colors.white};
|
|
|
-// background-color: ${colors.blue[500]};
|
|
|
-
|
|
|
-// padding: ${size === "regular"
|
|
|
-// ? !!text
|
|
|
-// ? "14px 17px"
|
|
|
-// : "14px"
|
|
|
-// : size === "small"
|
|
|
-// ? !!text
|
|
|
-// ? "12px 14px"
|
|
|
-// : "12px"
|
|
|
-// : "10px"};
|
|
|
-// font-size: ${size === "regular"
|
|
|
-// ? typography.sizes.button.large
|
|
|
-// : size === "small"
|
|
|
-// ? typography.sizes.button.medium
|
|
|
-// : typography.sizes.button.small};
|
|
|
-//
|
|
|
-//
|
|
|
-// `,
|
|
|
-// };
|
|
|
-
|
|
|
-// const secondaryButton = {
|
|
|
-// container: css`
|
|
|
-// border: 1px solid ${colors.blue[500]};
|
|
|
-
|
|
|
-// background-color: ${colors.black};
|
|
|
-// justify-content: center;
|
|
|
-// padding: ${size === "regular"
|
|
|
-// ? !!text
|
|
|
-// ? "14px 17px"
|
|
|
-// : "14px"
|
|
|
-// : size === "small"
|
|
|
-// ? !!text
|
|
|
-// ? "12px 14px"
|
|
|
-// : "12px"
|
|
|
-// : "10px"};
|
|
|
-// font-size: ${size === "regular"
|
|
|
-// ? typography.sizes.button.large
|
|
|
-// : size === "small"
|
|
|
-// ? typography.sizes.button.medium
|
|
|
-// : typography.sizes.button.small};
|
|
|
-// margin: 0 ${width === "normal" ? "15px" : "0"} 0 0;
|
|
|
-// height: ${buttonHeight};
|
|
|
-// max-height: ${buttonHeight};
|
|
|
-
|
|
|
-// &:hover {
|
|
|
-// background-color: ${colors.black};
|
|
|
-// border-color: ${colors.blue[700]};
|
|
|
-// color: ${colors.blue[300]};
|
|
|
-// }
|
|
|
-
|
|
|
-// &:active {
|
|
|
-// background-color: ${colors.black};
|
|
|
-// border-color: ${colors.blue[700]};
|
|
|
-// color: ${colors.blue[700]};
|
|
|
-// }
|
|
|
-// `,
|
|
|
-// };
|
|
|
-
|
|
|
-// const disabledButton = {
|
|
|
-// container: css`
|
|
|
-// border: 1px solid ${colors.white};
|
|
|
-// color: ${colors.white};
|
|
|
-// background-color: ${colors.gray[100]};
|
|
|
-// justify-content: center;
|
|
|
-// padding: ${size === "regular"
|
|
|
-// ? !!text
|
|
|
-// ? "14px 17px"
|
|
|
-// : "14px"
|
|
|
-// : size === "small"
|
|
|
-// ? !!text
|
|
|
-// ? "12px 14px"
|
|
|
-// : "12px"
|
|
|
-// : "10px"};
|
|
|
-// display: ${width === "normal" ? "inline-flex" : "flex"};
|
|
|
-// align-items: center;
|
|
|
-// cursor: ${disabled ? "not-allowed" : "default"};
|
|
|
-// font-family: ${typography.fonts.base};
|
|
|
-// font-weight: ${typography.weights.medium};
|
|
|
-// font-size: ${size === "regular"
|
|
|
-// ? typography.sizes.button.large
|
|
|
-// : size === "small"
|
|
|
-// ? typography.sizes.button.medium
|
|
|
-// : typography.sizes.button.small};
|
|
|
-// margin: 0 ${width === "normal" ? "15px" : "0"} 0 0;
|
|
|
-// height: ${buttonHeight};
|
|
|
-// max-height: ${buttonHeight};
|
|
|
-
|
|
|
-// &:hover {
|
|
|
-// background-color: ${colors.gray[100]};
|
|
|
-// border-color: ${colors.white};
|
|
|
-// color: ${colors.white};
|
|
|
-// }
|
|
|
-
|
|
|
-// &:active {
|
|
|
-// background-color: ${colors.gray[100]};
|
|
|
-// border-color: ${colors.white};
|
|
|
-// color: ${colors.white};
|
|
|
-// }
|
|
|
-
|
|
|
-// &::selection {
|
|
|
-// background: transparent;
|
|
|
-// }
|
|
|
-// `,
|
|
|
-// };
|
|
|
-
|
|
|
-// const icon = css`
|
|
|
-// margin-right: ${!!text ? "10px" : "0"};
|
|
|
-// font-size: ${size === "regular"
|
|
|
-// ? typography.sizes.icon.large
|
|
|
-// : size === "small"
|
|
|
-// ? typography.sizes.icon.medium
|
|
|
-// : typography.sizes.icon.small};
|
|
|
-
|
|
|
-// & > path:nth-of-type(1) {
|
|
|
-// color: inherit;
|
|
|
-// flex-shrink: 0;
|
|
|
-// }
|
|
|
-// `;
|
|
|
-
|
|
|
-// const result = disabled ? disabledButton : type === "primary" ? primaryButton : secondaryButton;
|
|
|
-// return { icon, ...result };
|
|
|
-// };
|