Skip to content

Commit

Permalink
вернул кастомную кнопку
Browse files Browse the repository at this point in the history
  • Loading branch information
semant1cs committed Dec 13, 2023
1 parent c36de98 commit 4360b1b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
19 changes: 19 additions & 0 deletions frontend/src/UIComponents/customButton/CustomButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import styles from './customButton.module.scss'

interface ICustomButtonInterface {
text: string,
handleOnClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void,
additionalClassName?: string
}

const CustomButton: React.FC<ICustomButtonInterface> =
({text, handleOnClick, additionalClassName}: ICustomButtonInterface) => {
return (
<button className={styles.custom__btn + " " + additionalClassName} onClick={(e) => handleOnClick(e)}>
{text}
</button>
);
};

export default CustomButton;
27 changes: 27 additions & 0 deletions frontend/src/UIComponents/customButton/customButton.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@import "./../UIVariablesStyle.scss";

.custom__btn {
width: 170px;
height: 48px;

color: #F9F9F9;
font-size: 16px;

background-color: $bgColor;
border: none;
border-radius: 20px;
transition: linear 0.1s;
font-family: Montserrat, sans-serif;

&:hover {
background-color: $bgColorHovered;
}

&:active {
background-color: $bgColorActive;
}

&:disabled {
background-color: $bgColorDisabled;
}
}

0 comments on commit 4360b1b

Please sign in to comment.