Skip to content
Snippets Groups Projects
Commit becc615f authored by Sebastian Hämäläinen's avatar Sebastian Hämäläinen
Browse files

Merge branch 'NXSTAGE-X-search' into 'development'

search page title styles

See merge request julkiset-sivut/design-system-lib!160
parents a34ef004 60bc968d
No related branches found
No related tags found
No related merge requests found
...@@ -419,6 +419,7 @@ export namespace Components { ...@@ -419,6 +419,7 @@ export namespace Components {
* @type {*} * @type {*}
*/ */
heading: HeadingVarians; heading: HeadingVarians;
isSearch: boolean;
negative: boolean; negative: boolean;
/** /**
* @type {*} * @type {*}
...@@ -1796,6 +1797,7 @@ declare namespace LocalJSX { ...@@ -1796,6 +1797,7 @@ declare namespace LocalJSX {
* @type {*} * @type {*}
*/ */
heading?: HeadingVarians; heading?: HeadingVarians;
isSearch?: boolean;
negative?: boolean; negative?: boolean;
/** /**
* @type {*} * @type {*}
......
...@@ -40,6 +40,24 @@ ...@@ -40,6 +40,24 @@
} }
} }
h1.hy-heading__search {
margin-bottom: 0;
padding: 16px 0 0;
@include breakpoint($narrow) {
padding: 28px 0 0;
}
@include breakpoint($wide) {
padding: 32px 0 0;
}
&__large {
@include breakpoint($extrawide) {
padding: 40px 0 0;
}
}
}
h2, h2,
h3, h3,
h4, h4,
......
...@@ -12,6 +12,7 @@ export class Heading { ...@@ -12,6 +12,7 @@ export class Heading {
* @type {*} * @type {*}
*/ */
@Prop() heading: HeadingVarians = HeadingVarians.default as any; @Prop() heading: HeadingVarians = HeadingVarians.default as any;
@Prop() isSearch: boolean = false;
/** /**
* @type {*} * @type {*}
*/ */
...@@ -35,6 +36,8 @@ export class Heading { ...@@ -35,6 +36,8 @@ export class Heading {
const classAttributes = [ const classAttributes = [
'hy-heading', 'hy-heading',
this.negative ? 'negative' : '', this.negative ? 'negative' : '',
this.isSearch ? 'hy-heading__search' : '',
this.isSearch ? `hy-heading__search__${this.headerstyle}` : '',
`hy-heading__${this.section}`, `hy-heading__${this.section}`,
`hy-heading__${this.headerstyle}`, `hy-heading__${this.headerstyle}`,
`hy-heading__${this.section}__${this.headerstyle}`, `hy-heading__${this.section}__${this.headerstyle}`,
......
...@@ -91,6 +91,7 @@ Provide heading attribute for the component to choose what type of heading to us ...@@ -91,6 +91,7 @@ Provide heading attribute for the component to choose what type of heading to us
| ------------- | ------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | ------------- | ------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| `headerstyle` | `headerstyle` | | `string` | `'common'` | | `headerstyle` | `headerstyle` | | `string` | `'common'` |
| `heading` | `heading` | | `HeadingVarians.default \| HeadingVarians.h2 \| HeadingVarians.h3 \| HeadingVarians.h4 \| HeadingVarians.h5 \| HeadingVarians.h6` | `HeadingVarians.default as any` | | `heading` | `heading` | | `HeadingVarians.default \| HeadingVarians.h2 \| HeadingVarians.h3 \| HeadingVarians.h4 \| HeadingVarians.h5 \| HeadingVarians.h6` | `HeadingVarians.default as any` |
| `isSearch` | `is-search` | | `boolean` | `false` |
| `negative` | `negative` | | `boolean` | `false` | | `negative` | `negative` | | `boolean` | `false` |
| `section` | `section` | | `HeadingSectionVariants.contentPageHeader \| HeadingSectionVariants.default \| HeadingSectionVariants.introduction \| HeadingSectionVariants.landingPageHeader \| HeadingSectionVariants.subSection` | `HeadingSectionVariants.default as any` | | `section` | `section` | | `HeadingSectionVariants.contentPageHeader \| HeadingSectionVariants.default \| HeadingSectionVariants.introduction \| HeadingSectionVariants.landingPageHeader \| HeadingSectionVariants.subSection` | `HeadingSectionVariants.default as any` |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment