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

OCT-11 #73

Open
wants to merge 4 commits into
base: experimental
Choose a base branch
from
Open

OCT-11 #73

wants to merge 4 commits into from

Conversation

rakeem996
Copy link
Contributor

Create individual components on the template page

Copy link

linear bot commented Jan 16, 2025

Copy link

github-actions bot commented Jan 16, 2025

Deploy preview for octalogic-website ready!

✅ Preview
https://octalogic-website-pc1mrjhp2-octalogic.vercel.app

Built with commit 539ff55.
This pull request is being automatically deployed with vercel-action

export function ContactButton() {
return (
<div className="button-container">
<Button variant="contactButton1" size="contactButtonSize">
Copy link
Member

Choose a reason for hiding this comment

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

@rakeem996 This component is not re-useable as it stands because if this sample component is used in different pages and you make a change in the template page, it will not change everywhere. You would have to go to all 20 pages and make the change.

The goal here is to make it easier to change the styles app wide without making a change in every place so you need to create a component called button that accepts a prop called variant. Those can be

  1. primary
  2. secondary
  3. outlined
  4. text

From here https://www.figma.com/design/8x4CwEJ8ESDjPMPNJLaQ5k/Octalogic-Tech-%7C-Website-Design?node-id=4-17567&t=AxRdN85kltW907Ex-1

<div className="space-y-6">
{/* Input Container */}
<div className="relative max-w-[320px] font-Montserrat">
<Label htmlFor="email" className="text-sm font-medium leading-[20px] text-[#0A3D62]">
Copy link
Member

Choose a reason for hiding this comment

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

@rakeem996 This whole block needs to be a component so that every other page simple has to add this and they will get a fully functionnig input with the correct theme, error state etc in their page without having to repeat this code every single time.

<Input type="email" id="email" placeholder="Email" />

<div>
<h3 className="text-lg font-medium">Regular</h3>
<div className="space-y-2">
<p className="font-Montserrat text-xs font-normal">Montserrat Regular - 12px</p>
Copy link
Member

Choose a reason for hiding this comment

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

@rakeem996 Likewise here, this needs to ba Typography component which accepts a variant prop.

Header should be h tags while anything that is not a header can be p tags or spans. The designer has fallen short here and he used quite a few variants so let's narrow it down. Take a look at which ones are headers and which ones are used in the body across and design and limit it. Here is how MUI does the variants https://mui.com/material-ui/react-typography/

@rakeem996 rakeem996 self-assigned this Jan 24, 2025
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.

2 participants