Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds TextSection component #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Adds TextSection component #9

wants to merge 1 commit into from

Conversation

SharieRhea
Copy link
Collaborator

Please let me know if there are any code conventions I am unaware of (my apologies, first time using React).
I'm not sure how responsive/scalable/customizable these are supposed to be, so please let me know.

Possible issues:

  • does not account for mobile in any way
  • no image scaling
  • alignment parameter is plaintext

Side note: Brandon, I am still unable to make any edits in the Project. Possibly I need to be invited to that separately from the repository?

@goldminer127 goldminer127 self-assigned this Feb 24, 2024
const flexDirection = (alignment === "left") ? "row" : "row-reverse";
return (
<div id="text-section" style={{width: '100%', maxWidth: '50vw', display: "flex", flexDirection: flexDirection, alignItems: 'flex-start', justifyContent: 'space-between'}}>
<div id="text-section-text" style={{padding: '0 4em'}}>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this div to a MaterialUI Box element. Eventually we want to add a dark and light theme to the website and using Boxes will allow us to toggle each element's theme much more easier than using normal divs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than format, everything looks good. Brandon said make it adjustable to themes for light and dark mode.

Copy link
Owner

@goldminer127 goldminer127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes before this can be approved.

Change the div starting in line 18 to a MUI Box.
Divs in the return statement aren't formatted correcty, it should look as the following

There are many ways we can write components in React, but to keep everything uniform to prevent confusion you should write the function header and export statement similar to the TestComponent.

Otherwise everything else looks good.

@goldminer127
Copy link
Owner

Basic customization needs are image alignments and components that are responsive to themes. Right now we don't have that set up so all you need to do is implement MUI boxes to set that up.

The wireframes linked in the webmaster channel shows how the mobile and the desktop views should look like. Your component should adjust to either display layout depending on how large the screen is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants