diff --git a/models/ContactSection.yaml b/models/ContactSection.yaml index 7e2915be..2cd4ddcb 100644 --- a/models/ContactSection.yaml +++ b/models/ContactSection.yaml @@ -1,7 +1,6 @@ type: object name: ContactSection label: Contact section -variantField: variant extends: - Section groups: diff --git a/models/CtaSection.yaml b/models/CtaSection.yaml index a4c74399..69410798 100644 --- a/models/CtaSection.yaml +++ b/models/CtaSection.yaml @@ -1,7 +1,6 @@ type: object name: CtaSection label: CTA section -variantField: variant extends: - Section groups: diff --git a/models/FeaturedPeopleSection.yaml b/models/FeaturedPeopleSection.yaml index 15da23a0..a0fbbceb 100644 --- a/models/FeaturedPeopleSection.yaml +++ b/models/FeaturedPeopleSection.yaml @@ -1,7 +1,6 @@ type: object name: FeaturedPeopleSection label: Featured people section -variantField: variant extends: - Section groups: diff --git a/models/FeaturedPostsSection.yaml b/models/FeaturedPostsSection.yaml index c39f3eb1..68b3bdda 100644 --- a/models/FeaturedPostsSection.yaml +++ b/models/FeaturedPostsSection.yaml @@ -1,7 +1,6 @@ type: object name: FeaturedPostsSection label: Featured posts section -variantField: variant extends: - Section groups: diff --git a/models/HeroSection.yaml b/models/HeroSection.yaml index ab307431..934d9e88 100644 --- a/models/HeroSection.yaml +++ b/models/HeroSection.yaml @@ -1,7 +1,6 @@ type: object name: HeroSection label: Hero section -variantField: variant extends: - Section groups: @@ -94,4 +93,24 @@ fields: label: Background image models: - ImageBlock - + - type: style + name: styles + styles: + badge: + fontSize: ['x-small', 'small', 'medium', 'large'] + fontWeight: [300, 400, 500] + textAlign: ['left', 'center', 'right'] + title: + fontSize: ['xx-large', 'xxx-large', 'xxxx-large'] + fontWeight: [300, 400, 500] + textAlign: ['left', 'center', 'right'] + subtitle: + fontSize: ['small', 'medium', 'large', 'x-large', 'xx-large'] + fontWeight: [300, 400, 500] + textAlign: ['left', 'center', 'right'] + text: + fontSize: ['small', 'medium', 'large', 'x-large'] + fontWeight: [300, 400, 500] + textAlign: ['left', 'center', 'right'] + actions: + justifyContent: ['start', 'center', 'end'] diff --git a/models/TestimonialsSection.yaml b/models/TestimonialsSection.yaml index c7eb3b02..e9f1522c 100644 --- a/models/TestimonialsSection.yaml +++ b/models/TestimonialsSection.yaml @@ -1,7 +1,6 @@ type: object name: TestimonialsSection label: Testimonials section -variantField: variant extends: - Section groups: diff --git a/public/models/ContactSection.yaml b/public/models/ContactSection.yaml index 7e2915be..2cd4ddcb 100644 --- a/public/models/ContactSection.yaml +++ b/public/models/ContactSection.yaml @@ -1,7 +1,6 @@ type: object name: ContactSection label: Contact section -variantField: variant extends: - Section groups: diff --git a/public/models/CtaSection.yaml b/public/models/CtaSection.yaml index a4c74399..69410798 100644 --- a/public/models/CtaSection.yaml +++ b/public/models/CtaSection.yaml @@ -1,7 +1,6 @@ type: object name: CtaSection label: CTA section -variantField: variant extends: - Section groups: diff --git a/public/models/FeaturedPeopleSection.yaml b/public/models/FeaturedPeopleSection.yaml index 15da23a0..a0fbbceb 100644 --- a/public/models/FeaturedPeopleSection.yaml +++ b/public/models/FeaturedPeopleSection.yaml @@ -1,7 +1,6 @@ type: object name: FeaturedPeopleSection label: Featured people section -variantField: variant extends: - Section groups: diff --git a/public/models/FeaturedPostsSection.yaml b/public/models/FeaturedPostsSection.yaml index c39f3eb1..68b3bdda 100644 --- a/public/models/FeaturedPostsSection.yaml +++ b/public/models/FeaturedPostsSection.yaml @@ -1,7 +1,6 @@ type: object name: FeaturedPostsSection label: Featured posts section -variantField: variant extends: - Section groups: diff --git a/public/models/HeroSection.yaml b/public/models/HeroSection.yaml index ab307431..934d9e88 100644 --- a/public/models/HeroSection.yaml +++ b/public/models/HeroSection.yaml @@ -1,7 +1,6 @@ type: object name: HeroSection label: Hero section -variantField: variant extends: - Section groups: @@ -94,4 +93,24 @@ fields: label: Background image models: - ImageBlock - + - type: style + name: styles + styles: + badge: + fontSize: ['x-small', 'small', 'medium', 'large'] + fontWeight: [300, 400, 500] + textAlign: ['left', 'center', 'right'] + title: + fontSize: ['xx-large', 'xxx-large', 'xxxx-large'] + fontWeight: [300, 400, 500] + textAlign: ['left', 'center', 'right'] + subtitle: + fontSize: ['small', 'medium', 'large', 'x-large', 'xx-large'] + fontWeight: [300, 400, 500] + textAlign: ['left', 'center', 'right'] + text: + fontSize: ['small', 'medium', 'large', 'x-large'] + fontWeight: [300, 400, 500] + textAlign: ['left', 'center', 'right'] + actions: + justifyContent: ['start', 'center', 'end'] diff --git a/public/models/TestimonialsSection.yaml b/public/models/TestimonialsSection.yaml index c7eb3b02..e9f1522c 100644 --- a/public/models/TestimonialsSection.yaml +++ b/public/models/TestimonialsSection.yaml @@ -1,7 +1,6 @@ type: object name: TestimonialsSection label: Testimonials section -variantField: variant extends: - Section groups: diff --git a/src/components/HeroSection/hero-section.stories.js b/src/components/HeroSection/hero-section.stories.js index 25f65ed7..78c4ea95 100644 --- a/src/components/HeroSection/hero-section.stories.js +++ b/src/components/HeroSection/hero-section.stories.js @@ -140,6 +140,31 @@ const args = { url: '/images/hero.png', altText: 'Image alt text', caption: 'Image caption' + }, + styles: { + badge: { + fontSize: 'x-small', + fontWeight: '400', + textAlign: 'left' + }, + title: { + fontSize: 'xxxx-large', + fontWeight: '500', + textAlign: 'left' + }, + subtitle: { + fontSize: 'xx-large', + fontWeight: '300', + textAlign: 'left' + }, + text: { + fontSize: 'large', + fontWeight: '400', + textAlign: 'left' + }, + actions: { + justifyContent: 'start' + } } }; diff --git a/src/components/HeroSection/index.js b/src/components/HeroSection/index.js index 5bb58156..7539b025 100644 --- a/src/components/HeroSection/index.js +++ b/src/components/HeroSection/index.js @@ -2,6 +2,7 @@ import * as React from 'react'; import Markdown from 'markdown-to-jsx'; import classNames from 'classnames'; import { getDynamicComponent } from '../../components-registry'; +import { mapStylesToClassNames as mapStyles } from '../../utils/map-styles-to-class-names'; import Badge from '../Badge'; import Action from '../Action'; @@ -98,7 +99,6 @@ function heroVariants(props) { function heroFeatureRight(props) { const contentAlignVert = props.contentAlignVert || 'middle'; - const textAlign = props.textAlign || 'left'; return (
+
{props.subtitle}
)} {props.text && ( -