Skip to content

Commit

Permalink
add divider to section renamer and add button
Browse files Browse the repository at this point in the history
  • Loading branch information
ducaale committed Jan 1, 2024
1 parent a9d6e95 commit 0ede43c
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/components/core/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { colors } from '../../theme'
export const Divider = styled.hr`
margin: 24px 0;
background: ${colors.primary};
height: 10px;
height: 4px;
border: none;
`
15 changes: 9 additions & 6 deletions src/components/generator/form/sections/AwardsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ export function AwardSection() {
return (
<FormSection title="Honors & Awards">
{fields.length > 0 && (
<LabeledInput
name="headings.awards"
label="Section Heading"
placeholder="Awards"
/>
<Fragment>
<LabeledInput
name="headings.awards"
label="Section Heading"
placeholder="Awards"
/>
<Divider />
</Fragment>
)}
{fields.map((field, index) => (
<Fragment key={field.id}>
<Divider />
<LabeledInput
name={`awards.${index}.title`}
label="Award Name"
Expand All @@ -40,6 +42,7 @@ export function AwardSection() {
label="Summary"
placeholder="Recognized for creating the most awesome project at a hackathon."
/>
<Divider />
</Fragment>
))}
<AddButton type="button" onClick={() => append({})}>
Expand Down
15 changes: 9 additions & 6 deletions src/components/generator/form/sections/EducationSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ export function EducationSection() {
return (
<FormSection title="Your Educational Background">
{fields.length > 0 && (
<LabeledInput
name="headings.education"
label="Section Heading"
placeholder="Education"
/>
<Fragment>
<LabeledInput
name="headings.education"
label="Section Heading"
placeholder="Education"
/>
<Divider />
</Fragment>
)}
{fields.map((field, index) => (
<Fragment key={field.id}>
<Divider />
<LabeledInput
name={`education.${index}.institution`}
label="School name"
Expand All @@ -45,6 +47,7 @@ export function EducationSection() {
label="End Date"
placeholder="Jun 2019"
/>
<Divider />
</Fragment>
))}
<AddButton type="button" onClick={() => append({})}>
Expand Down
1 change: 1 addition & 0 deletions src/components/generator/form/sections/FormSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styled from 'styled-components'
const Container = styled.fieldset`
width: 100%;
padding: 0 2rem;
padding-bottom: 2rem;
`

const Title = styled.h2`
Expand Down
15 changes: 9 additions & 6 deletions src/components/generator/form/sections/SkillsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ export function SkillsSection() {
return (
<FormSection title="Your Skills">
{fields.length > 0 && (
<LabeledInput
name="headings.skills"
label="Section Heading"
placeholder="Skills"
/>
<Fragment>
<LabeledInput
name="headings.skills"
label="Section Heading"
placeholder="Skills"
/>
<Divider />
</Fragment>
)}
{fields.map((field, index) => (
<Fragment key={field.id}>
<Divider />
<LabeledInput
name={`skills.${index}.name`}
label="Skill name"
Expand All @@ -32,6 +34,7 @@ export function SkillsSection() {
placeholder="TypeScript"
name={`skills.${index}.keywords`}
/>
<Divider />
</Fragment>
))}
<AddButton type="button" onClick={() => append({})}>
Expand Down
15 changes: 9 additions & 6 deletions src/components/generator/form/sections/WorkSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ export function WorkSection() {
return (
<FormSection title="Your Work Experience">
{fields.length > 0 && (
<LabeledInput
name="headings.work"
label="Section Heading"
placeholder="Work"
/>
<Fragment>
<LabeledInput
name="headings.work"
label="Section Heading"
placeholder="Work"
/>
<Divider />
</Fragment>
)}
{fields.map((field, index) => (
<Fragment key={field.id}>
<Divider />
<LabeledInput
name={`work.${index}.company`}
label="Company name"
Expand Down Expand Up @@ -52,6 +54,7 @@ export function WorkSection() {
placeholder="Did cool stuff at company"
name={`work.${index}.highlights`}
/>
<Divider />
</Fragment>
))}
<AddButton type="button" onClick={() => append({})}>
Expand Down
15 changes: 9 additions & 6 deletions src/components/generator/form/sections/projectsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ export function ProjectsSection() {
return (
<FormSection title="Your Projects">
{fields.length > 0 && (
<LabeledInput
name="headings.projects"
label="Section Heading"
placeholder="Projects"
/>
<Fragment>
<LabeledInput
name="headings.projects"
label="Section Heading"
placeholder="Projects"
/>
<Divider />
</Fragment>
)}
{fields.map((field, index) => (
<Fragment key={field.id}>
<Divider />
<LabeledInput
name={`projects.${index}.name`}
label="Project Name"
Expand All @@ -42,6 +44,7 @@ export function ProjectsSection() {
placeholder="TypeScript"
name={`projects.${index}.keywords`}
/>
<Divider />
</Fragment>
))}
<AddButton type="button" onClick={() => append({})}>
Expand Down

0 comments on commit 0ede43c

Please sign in to comment.