-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create section-header component for marketing site (#3070)
* adding section header component * add pseudo class part * rename attribute * changed short attribute to a <p> tag * removed attributes to use slots * Update hero and page section to use section-header component. Removed global background and color style * changed subheading to badge * swap default with badge slot. update component implementation on page
- Loading branch information
1 parent
0264c93
commit 2518b63
Showing
7 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { GradientPicker } from "./gradient-picker"; | ||
export { FASTSectionHeader } from "./section-header"; |
14 changes: 14 additions & 0 deletions
14
sites/fast-website/src/app/components/section-header/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { customElement } from "@microsoft/fast-element"; | ||
import { SectionHeader } from "./section-header"; | ||
import { SectionHeaderTemplate as template } from "./section-header.template"; | ||
import { SectionHeaderStyles as styles } from "./section-header.styles"; | ||
|
||
@customElement({ | ||
name: "fast-section-header", | ||
template, | ||
styles, | ||
}) | ||
export class FASTSectionHeader extends SectionHeader {} | ||
export * from "./section-header.template"; | ||
export * from "./section-header.styles"; | ||
export * from "./section-header"; |
12 changes: 12 additions & 0 deletions
12
sites/fast-website/src/app/components/section-header/section-header.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { css } from "@microsoft/fast-element"; | ||
import { display } from "@microsoft/fast-components"; | ||
|
||
export const SectionHeaderStyles = css` | ||
${display("flex")} :host { | ||
flex-direction: column; | ||
font-family: var(--body-font); | ||
color: var(--neutral-foreground-rest); | ||
box-sizing: border-box; | ||
text-align: center; | ||
} | ||
`; |
11 changes: 11 additions & 0 deletions
11
sites/fast-website/src/app/components/section-header/section-header.template.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { html } from "@microsoft/fast-element"; | ||
import { SectionHeader } from "./section-header"; | ||
|
||
export const SectionHeaderTemplate = html<SectionHeader>` | ||
<template> | ||
<slot name="badge"></slot> | ||
<slot></slot> | ||
<slot name="body"></slot> | ||
<slot name="action"></slot> | ||
</template> | ||
`; |
3 changes: 3 additions & 0 deletions
3
sites/fast-website/src/app/components/section-header/section-header.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { FASTElement } from "@microsoft/fast-element"; | ||
|
||
export class SectionHeader extends FASTElement {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters