Skip to content
Snippets Groups Projects
Commit 87a6ac09 authored by danieldeng2's avatar danieldeng2
Browse files

Central place for style of primary buttons

parent 18da6141
No related branches found
No related tags found
No related merge requests found
...@@ -20,4 +20,41 @@ code { ...@@ -20,4 +20,41 @@ code {
background-color: #f8f9fa; background-color: #f8f9fa;
border-color: #0062cc; border-color: #0062cc;
box-shadow: none; box-shadow: none;
} }
\ No newline at end of file
.btn-primary{
margin-bottom: 0.625rem;
color: #000;
background: #f6f8fa;
font-size: 1.05rem;
letter-spacing: 0;
border-width: 0rem;
line-height: 1.375rem;
height: 2.25rem;
border-radius: 0.5rem !important;
text-align: left;
transition: 0.2s background;
-webkit-transition: 0.2s background;
-moz-transition: 0.2s background;
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
}
.btn-primary.active,
.btn-primary:active {
color: #fff;
background: #000 !important;
font-weight: 500;
text-align: left;
border-width: 0rem;
height: 2.25rem;
line-height: 1.375rem;
}
.btn-primary:hover {
background: #e5e5e5;
border-color: #fff;
color: #000;
}
import React from "react"; import React from "react";
import Row from "react-bootstrap/Row"; import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col"; import Col from "react-bootstrap/Col";
import styles from "./style.module.scss";
import { import {
faGlobe, faGlobe,
faFileAlt, faFileAlt,
...@@ -22,7 +21,6 @@ const DashboardButtonGroup: React.FC = () => { ...@@ -22,7 +21,6 @@ const DashboardButtonGroup: React.FC = () => {
{buttons.map(({ title, icon, url }, i) => ( {buttons.map(({ title, icon, url }, i) => (
<Col xs={6} sm={6} md={4} lg={4} xl={3} key={i} style={{ paddingRight: "10px", paddingLeft:"10px"}}> <Col xs={6} sm={6} md={4} lg={4} xl={3} key={i} style={{ paddingRight: "10px", paddingLeft:"10px"}}>
<Button <Button
className={styles.dashboardButton}
href={url} href={url}
target="_blank" target="_blank"
> >
...@@ -30,7 +28,6 @@ const DashboardButtonGroup: React.FC = () => { ...@@ -30,7 +28,6 @@ const DashboardButtonGroup: React.FC = () => {
<FontAwesomeIcon <FontAwesomeIcon
style={{ fontSize: "1.125rem" }} style={{ fontSize: "1.125rem" }}
icon={icon} icon={icon}
className={styles.dashboardButtonSvg}
/> />
</Button> </Button>
</Col> </Col>
......
@import "assets/scss/custom";
$button-background: transparentize($gray-200, 0.75);
$button-border: transparentize($gray-300, 1);
.dashboardButton,
.dashboardButton:global(.a) {
margin-bottom: 0.625rem;
color: #000;
background: $button-background;
font-size: 1.05rem;
letter-spacing: 0;
border: 1px solid $button-border;
line-height: 1.375rem;
height: 2.25rem;
border-radius: 0.5rem !important;
text-align: left;
transition: 0.2s transform, 0.2s box-shadow, 0.2s background-color;
-webkit-transition: 0.2s transform, 0.2s box-shadow, 0.2s background-color;
-moz-transition: 0.2s transform, 0.2s box-shadow, 0.2s background-color;
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
}
.dashboardButton:global(.active),
.dashboardButton:active {
color: #fff;
background: #000 !important;
font-weight: 500;
text-align: left;
border-width: 0rem;
height: 2.25rem;
line-height: 1.375rem;
}
.dashboardButton:hover {
background-color: $button-background;
border-color: $gray-300;
color: #000;
transform: scale(1.03);
box-shadow: 0 0.125rem 0.625rem 0 rgba(0, 0, 0, 0.1);
}
...@@ -36,7 +36,6 @@ const SideBarTabGroup: React.FC<SideBarTabGroupProp> = ({ ...@@ -36,7 +36,6 @@ const SideBarTabGroup: React.FC<SideBarTabGroupProp> = ({
as={NavLink} as={NavLink}
to={activeURL} to={activeURL}
activeClassName={"active"} activeClassName={"active"}
className={styles.tabGroupButton}
key={title} key={title}
> >
{title} {title}
...@@ -50,7 +49,6 @@ const SideBarTabGroup: React.FC<SideBarTabGroupProp> = ({ ...@@ -50,7 +49,6 @@ const SideBarTabGroup: React.FC<SideBarTabGroupProp> = ({
<Button <Button
href={externalURL} href={externalURL}
target="_blank" target="_blank"
className={styles.tabGroupButton}
key={title} key={title}
> >
{title} {title}
...@@ -61,7 +59,7 @@ const SideBarTabGroup: React.FC<SideBarTabGroupProp> = ({ ...@@ -61,7 +59,7 @@ const SideBarTabGroup: React.FC<SideBarTabGroupProp> = ({
return ( return (
<Button <Button
className={classNames({ active: active }, styles.tabGroupButton)} className={classNames({ active: active })}
onClick={onClick} onClick={onClick}
key={title} key={title}
> >
......
...@@ -3,46 +3,11 @@ ...@@ -3,46 +3,11 @@
$button-background: transparentize($gray-200, 0.75); $button-background: transparentize($gray-200, 0.75);
$button-border: transparentize($gray-300, 1); $button-border: transparentize($gray-300, 1);
.tabGroupButton,
.tabGroupButton:global(.a) {
margin-bottom: 0.625rem;
color: #000;
background: $button-background;
font-size: 1.05rem;
letter-spacing: 0;
border: 1px solid $button-border;
line-height: 1.375rem;
height: 2.25rem;
border-radius: 0.5rem !important;
text-align: left;
transition: 0.2s transform, 0.2s box-shadow, 0.2s background;
-webkit-transition: 0.2s transform, 0.2s box-shadow, 0.2s background;
-moz-transition: 0.2s transform, 0.2s box-shadow, 0.2s background;
}
.tabGroupButtonSvg { .tabGroupButtonSvg {
float: right; float: right;
margin-top: 0.22rem; margin-top: 0.22rem;
} }
.tabGroupButton:global(.active),
.tabGroupButton:active {
color: #fff;
background: #000 !important;
font-weight: 500;
text-align: left;
border-width: 0rem;
height: 2.25rem;
line-height: 1.375rem;
}
.tabGroupButton:hover {
background-color: $button-background;
border-color: $gray-300;
color: #000;
transform: scale(1.03);
box-shadow: 0 0.125rem 0.625rem 0 rgba(0, 0, 0, 0.1);
}
@media (max-width: 62rem) { @media (max-width: 62rem) {
.tabGroupButtonGroup { .tabGroupButtonGroup {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment