-
-
Notifications
You must be signed in to change notification settings - Fork 957
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ACT-1388: Component: Button
- Loading branch information
Vlad Lo.
committed
Jul 10, 2024
1 parent
b15b3bd
commit ffdf0bf
Showing
8 changed files
with
231 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
:root[data-theme='dark'] { | ||
--button-background-color: #1098FC; | ||
--button-color: #141618; | ||
--button-hover-background-color: #26A2FC; | ||
--button-hover-shadow: 0px 2px 8px 0px var(--shadow-primary, rgba(16, 152, 252, 0.40)); | ||
--button-active-background-color: #3BAAFD; | ||
} | ||
|
||
:root[data-theme='light'] { | ||
--button-background-color: #0376C9; | ||
--button-color: #FFFFFF; | ||
--button-hover-background-color: #036AB5; | ||
--button-hover-shadow: 0px 2px 8px 0px var(--shadow-primary, rgba(3, 118, 201, 0.20)); | ||
--button-active-background-color: #025EA1; | ||
} | ||
|
||
.button { | ||
color: var(--button-color); | ||
background-color: var(--button-background-color); | ||
border: none; | ||
padding: 0 16px; | ||
height: 40px; | ||
border-radius: 24px; | ||
font-size: 14px; | ||
font-style: normal; | ||
font-weight: 500; | ||
line-height: 22px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
min-width: 145px; | ||
|
||
&:hover { | ||
background-color: var(--button-hover-background-color); | ||
box-shadow: var(--button-hover-shadow); | ||
} | ||
|
||
&:active { | ||
background-color: var(--button-active-background-color); | ||
} | ||
|
||
&:disabled { | ||
opacity: 0.5; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import styles from "./button.module.scss"; | ||
|
||
interface IButton { | ||
onClick: VoidFunction; | ||
children: string | React.ReactElement | ||
} | ||
|
||
export default function Button({onClick, children}: IButton) { | ||
return ( | ||
<button className={styles.button} onClick={onClick}> | ||
{children} | ||
</button> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
:root[data-theme='dark'] { | ||
--faucet-bg-color-primary: #252526; | ||
--faucet-box-shadow: none; | ||
} | ||
|
||
:root[data-theme='light'] { | ||
--faucet-bg-color-primary: #FFFFFF; | ||
--faucet-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06); | ||
} | ||
|
||
:global(.navbar) { | ||
box-shadow: none; | ||
} | ||
|
||
.authCont { | ||
padding: var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal); | ||
height: 80px; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
background: var(--faucet-bg-color-primary); | ||
box-shadow: var(--ifm-navbar-shadow); | ||
|
||
@media screen and (max-width: 996px) { | ||
box-shadow: none; | ||
height: 110px; | ||
padding-bottom: 70px; | ||
} | ||
|
||
.title { | ||
font-weight: 700; | ||
font-size: 14px; | ||
} | ||
} | ||
|
||
.tabs { | ||
:global(.tabs-container) { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
|
||
> *:last-child { | ||
width: 100%; | ||
position: relative; | ||
} | ||
} | ||
|
||
.header { | ||
font-weight: 400; | ||
white-space: nowrap; | ||
position: relative; | ||
top: -60px; | ||
display: inline-flex; | ||
|
||
> li { | ||
padding: 6px 8px; | ||
border-bottom-width: 2px; | ||
|
||
&:hover { | ||
background: none; | ||
} | ||
} | ||
|
||
@media screen and (max-width: 996px) { | ||
// top: -10px; | ||
} | ||
} | ||
|
||
.content { | ||
width: 100%; | ||
padding: 0 var(--ifm-navbar-padding-horizontal); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters