Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit eae54d9

Browse files
committed
transformed header view to css modules :/
1 parent 96af3d6 commit eae54d9

File tree

21 files changed

+1287
-1278
lines changed

21 files changed

+1287
-1278
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"install-docusaurus": "yalc add @docusaurus/core & yarn install"
1414
},
1515
"dependencies": {
16-
"@agile-ts/core": "0.0.10",
17-
"@agile-ts/react": "0.0.10",
16+
"@agile-ts/core": "0.0.11",
17+
"@agile-ts/react": "0.0.11",
1818
"@docusaurus/core": "^2.0.0-alpha.70",
1919
"@docusaurus/module-type-aliases": "^2.0.0-alpha.70",
2020
"@docusaurus/preset-classic": "^2.0.0-alpha.70",

src/components/HeaderTyper/index.tsx

Lines changed: 0 additions & 109 deletions
This file was deleted.

src/components/buttons/GithubButton/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
import React from "react";
22
import { FaGithub } from "react-icons/all";
33
import { useHistory } from "react-router-dom";
4-
import styles from "./styles.module.scss";
4+
import styles from "./styles.module.css";
5+
import clsx from "clsx";
56

6-
export type Props = { to: string };
7+
export type Props = { to: string; className: string };
78

89
const GithubButton: React.FC<Props> = (props) => {
9-
const { to } = props;
10+
const { to, className } = props;
1011
const history = useHistory();
1112

1213
return (
1314
<button
14-
className={styles.buttonContainer}
15+
className={clsx(styles.ButtonContainer, className)}
1516
onClick={() => {
1617
if (to.startsWith("http")) {
1718
window.location.href = to;
1819
return;
1920
}
2021
history.push(to);
2122
}}
22-
{...props}
2323
>
24-
<FaGithub className={styles.githubIcon} />
24+
<FaGithub className={styles.GithubIcon} />
2525
<div>GITHUB</div>
2626
</button>
2727
);

src/components/buttons/GithubButton/styles.module.scss renamed to src/components/buttons/GithubButton/styles.module.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.buttonContainer {
1+
.ButtonContainer {
22
color: var(--ifm-color-on-surface);
33
background-color: var(--ifm-color-surface);
44

@@ -18,12 +18,12 @@
1818
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3);
1919

2020
transition: 0.3s ease all;
21+
}
2122

22-
&:hover {
23-
background-color: var(--ifm-color-surface-2);
24-
}
23+
.ButtonContainer:hover {
24+
background-color: var(--ifm-color-surface-2);
25+
}
2526

26-
.githubIcon {
27-
margin-right: 5px;
28-
}
29-
}
27+
.GithubIcon {
28+
margin-right: 5px;
29+
}

src/components/buttons/PrimaryButton.tsx

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from "react";
2+
import { useHistory } from "react-router-dom";
3+
import styles from "./styles.module.css";
4+
import clsx from "clsx";
5+
6+
export type Props = { to: string; className: string };
7+
8+
const PrimaryButton: React.FC<Props> = (props) => {
9+
const { to, children, className } = props;
10+
const history = useHistory();
11+
12+
return (
13+
<button
14+
className={clsx(styles.ButtonContainer, className)}
15+
onClick={() => {
16+
if (to.startsWith("http")) {
17+
window.location.href = to;
18+
return;
19+
}
20+
history.push(to);
21+
}}
22+
>
23+
{children}
24+
</button>
25+
);
26+
};
27+
28+
export default PrimaryButton;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.ButtonContainer {
2+
color: var(--ifm-color-on-primary);
3+
background-color: var(--ifm-color-primary);
4+
border-radius: 3px;
5+
border: none;
6+
7+
font-size: 18px;
8+
font-weight: bold;
9+
10+
cursor: pointer;
11+
12+
padding: 15px 30px;
13+
align-items: center;
14+
justify-content: center;
15+
16+
transition: 0.3s ease all;
17+
}
18+
19+
.ButtonContainer:hover {
20+
background-color: var(--ifm-color-primary-lighter);
21+
}

0 commit comments

Comments
 (0)