From 4cb02719467b700993631bee0406f98e84384cda Mon Sep 17 00:00:00 2001
From: katja <ekaterina.kondareva@druid.fi>
Date: Tue, 9 Mar 2021 14:16:13 +0200
Subject: [PATCH] search page title styles

---
 src/components.d.ts                 |  2 ++
 src/components/heading/heading.scss | 18 ++++++++++++++++++
 src/components/heading/heading.tsx  |  2 ++
 src/components/heading/readme.md    |  1 +
 4 files changed, 23 insertions(+)

diff --git a/src/components.d.ts b/src/components.d.ts
index c1fb418b..77b586bd 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -419,6 +419,7 @@ export namespace Components {
      * @type {*}
      */
     heading: HeadingVarians;
+    isSearch: boolean;
     negative: boolean;
     /**
      * @type {*}
@@ -1796,6 +1797,7 @@ declare namespace LocalJSX {
      * @type {*}
      */
     heading?: HeadingVarians;
+    isSearch?: boolean;
     negative?: boolean;
     /**
      * @type {*}
diff --git a/src/components/heading/heading.scss b/src/components/heading/heading.scss
index abf53e04..519c1d04 100644
--- a/src/components/heading/heading.scss
+++ b/src/components/heading/heading.scss
@@ -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,
   h3,
   h4,
diff --git a/src/components/heading/heading.tsx b/src/components/heading/heading.tsx
index ee5ccfae..4a77692c 100644
--- a/src/components/heading/heading.tsx
+++ b/src/components/heading/heading.tsx
@@ -12,6 +12,7 @@ export class Heading {
    * @type {*}
    */
   @Prop() heading: HeadingVarians = HeadingVarians.default as any;
+  @Prop() isSearch: boolean = false;
   /**
    * @type {*}
    */
@@ -35,6 +36,7 @@ export class Heading {
     const classAttributes = [
       'hy-heading',
       this.negative ? 'negative' : '',
+      this.isSearch ? 'hy-heading__search' : '',
       `hy-heading__${this.section}`,
       `hy-heading__${this.headerstyle}`,
       `hy-heading__${this.section}__${this.headerstyle}`,
diff --git a/src/components/heading/readme.md b/src/components/heading/readme.md
index 8e1ff079..f9e807c9 100644
--- a/src/components/heading/readme.md
+++ b/src/components/heading/readme.md
@@ -91,6 +91,7 @@ Provide heading attribute for the component to choose what type of heading to us
 | ------------- | ------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
 | `headerstyle` | `headerstyle` |             | `string`                                                                                                                                                                                             | `'common'`                              |
 | `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`                                 |
 | `section`     | `section`     |             | `HeadingSectionVariants.contentPageHeader \| HeadingSectionVariants.default \| HeadingSectionVariants.introduction \| HeadingSectionVariants.landingPageHeader \| HeadingSectionVariants.subSection` | `HeadingSectionVariants.default as any` |
 
-- 
GitLab