Skip to content

Commit

Permalink
Style forms and .content
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraBergstrom committed Jul 6, 2023
1 parent 0d7a588 commit e9bc519
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/pages/travelers/TravelerEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from "../../contexts/CurrentUserContext";

import btnStyles from "../../styles/Button.module.css";
import appStyles from "../../App.module.css";
import styles from "../../styles/TravelerPage.module.css";

const TravelerEditForm = () => {
const currentUser = useCurrentUser();
Expand Down Expand Up @@ -153,7 +153,7 @@ const TravelerEditForm = () => {
<Form onSubmit={handleSubmit}>
<Row>
<Col className="py-2 p-0 p-md-2 text-center" md={7} lg={6}>
<Container className={appStyles.Content}>
<Container className={styles.Content}>
<Form.Group>
{image && (
<figure>
Expand Down Expand Up @@ -192,7 +192,7 @@ const TravelerEditForm = () => {
</Container>
</Col>
<Col md={5} lg={6} className="d-none d-md-block p-0 p-md-2 text-center">
<Container className={appStyles.Content}>{textFields}</Container>
<Container className={styles.Content}>{textFields}</Container>
</Col>
</Row>
</Form>
Expand Down
15 changes: 7 additions & 8 deletions src/pages/travelers/TravelerPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Button from "react-bootstrap/Button";
import Asset from "../../components/Asset";

import styles from "../../styles/TravelerPage.module.css";
import appStyles from "../../App.module.css";
import btnStyles from "../../styles/Button.module.css";

import { useCurrentUser } from "../../contexts/CurrentUserContext";
Expand Down Expand Up @@ -73,16 +72,16 @@ function TravelerPage() {
<h3 className="m-2">{traveler?.owner}</h3>
<Row className="justify-content-center no-gutters">
<Col xs={3} className="my-2">
<div>{traveler?.posts_count}</div>
<div>posts</div>
<div className={styles.Text}>{traveler?.posts_count}</div>
<div className={styles.Text}>posts</div>
</Col>
<Col xs={3} className="my-2">
<div>{traveler?.followers_count}</div>
<div>followers</div>
<div className={styles.Text}>{traveler?.followers_count}</div>
<div className={styles.Text}>followers</div>
</Col>
<Col xs={3} className="my-2">
<div>{traveler?.following_count}</div>
<div>following</div>
<div className={styles.Text}>{traveler?.following_count}</div>
<div className={styles.Text}>following</div>
</Col>
</Row>
</Col>
Expand Down Expand Up @@ -164,7 +163,7 @@ function TravelerPage() {
<Row>
<Col className="py-3 p-0 p-lg-2" lg={12}>
{/* <PopularTravelers mobile /> */}
<Container className={appStyles.Content}>
<Container className={styles.Content}>
{hasLoaded ? (
<>
{mainTraveler}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/travelers/UserPasswordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { axiosRes } from "../../api/axiosDefaults";
import { useCurrentUser } from "../../contexts/CurrentUserContext";

import btnStyles from "../../styles/Button.module.css";
import appStyles from "../../App.module.css";
import styles from "../../styles/TravelerPage.module.css";

const UserPasswordForm = () => {
const history = useHistory();
Expand Down Expand Up @@ -55,7 +55,7 @@ const UserPasswordForm = () => {
return (
<Row>
<Col className="py-2 mx-auto text-center" md={6}>
<Container className={appStyles.Content}>
<Container className={styles.Content}>
<Form onSubmit={handleSubmit}>
<Form.Group>
<Form.Label>New password</Form.Label>
Expand Down Expand Up @@ -88,7 +88,7 @@ const UserPasswordForm = () => {
</Alert>
))}
<Button
className={`${btnStyles.Button} ${btnStyles.Blue}`}
className={`${btnStyles.Button} ${btnStyles.Bright}`}
onClick={() => history.goBack()}
>
cancel
Expand Down
6 changes: 3 additions & 3 deletions src/pages/travelers/UsernameForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from "../../contexts/CurrentUserContext";

import btnStyles from "../../styles/Button.module.css";
import appStyles from "../../App.module.css";
import styles from "../../styles/TravelerPage.module.css";

const UsernameForm = () => {
const [username, setUsername] = useState("");
Expand Down Expand Up @@ -55,7 +55,7 @@ const UsernameForm = () => {
return (
<Row>
<Col className="py-2 mx-auto text-center" md={6}>
<Container className={appStyles.Content}>
<Container className={styles.Content}>
<Form onSubmit={handleSubmit} className="my-2">
<Form.Group>
<Form.Label>Change username</Form.Label>
Expand All @@ -72,7 +72,7 @@ const UsernameForm = () => {
</Alert>
))}
<Button
className={`${btnStyles.Button} ${btnStyles.Blue}`}
className={`${btnStyles.Button} ${btnStyles.Bright}`}
onClick={() => history.goBack()}
>
cancel
Expand Down
3 changes: 1 addition & 2 deletions src/styles/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
border-radius: 10px;
border-color: transparent;
padding: 4px 10px;
margin-left: 2px;
margin-right: 2px;
margin: 20px 5px;
min-width: 75px;
}

Expand Down
1 change: 1 addition & 0 deletions src/styles/Post.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ h5 {
display: flex;
align-items: stretch;
justify-content: center;
margin-top: 20px;
}
8 changes: 8 additions & 0 deletions src/styles/TravelerPage.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.Content {
padding: 10px;
}

.Text {
color: var(--clr-accent-dark);
}

.TravelerImage {
object-fit: cover;
height: 120px;
Expand Down

0 comments on commit e9bc519

Please sign in to comment.