Skip to content
Snippets Groups Projects
Commit 2bf6eb2d authored by Ekaterina Kondareva's avatar Ekaterina Kondareva
Browse files

text paragraph, styles for content page text paragraph with respect to if it...

text paragraph, styles for content page text paragraph with respect to if it is external or internal
parent d7c26363
No related branches found
No related tags found
No related merge requests found
...@@ -438,6 +438,7 @@ export namespace Components { ...@@ -438,6 +438,7 @@ export namespace Components {
} }
interface HyParagraphText { interface HyParagraphText {
headerstyle: string; headerstyle: string;
placement: string;
variant: string; variant: string;
} }
interface HyProcess { interface HyProcess {
...@@ -1298,6 +1299,7 @@ declare namespace LocalJSX { ...@@ -1298,6 +1299,7 @@ declare namespace LocalJSX {
} }
interface HyParagraphText { interface HyParagraphText {
headerstyle?: string; headerstyle?: string;
placement?: string;
variant?: string; variant?: string;
} }
interface HyProcess { interface HyProcess {
......
...@@ -4,6 +4,15 @@ ...@@ -4,6 +4,15 @@
* Common styles for text plus mobile & tablet & small desktop * Common styles for text plus mobile & tablet & small desktop
* in Content Pages and Field of science pages. * in Content Pages and Field of science pages.
*/ */
.hy-paragraph-text.content_page.external,
.hy-paragraph-text.field_of_science.external {
margin-top: 24px;
@include breakpoint($narrow) {
margin-top: 16px;
}
}
.hy-paragraph-text.content_page, .hy-paragraph-text.content_page,
.hy-paragraph-text.field_of_science { .hy-paragraph-text.field_of_science {
h2 { h2 {
......
...@@ -11,6 +11,7 @@ import {Component, Element, h, Host, Prop} from '@stencil/core'; ...@@ -11,6 +11,7 @@ import {Component, Element, h, Host, Prop} from '@stencil/core';
}) })
export class ParagraphText { export class ParagraphText {
@Prop() variant: string; @Prop() variant: string;
@Prop() placement: string = 'internal';
@Prop() headerstyle: string = 'default'; @Prop() headerstyle: string = 'default';
@Element() el: HTMLElement; @Element() el: HTMLElement;
...@@ -24,7 +25,9 @@ export class ParagraphText { ...@@ -24,7 +25,9 @@ export class ParagraphText {
} }
render() { render() {
const classAttributes = ['hy-paragraph-text', `${this.variant}`, `${this.headerstyle}`].join(' '); const classAttributes = ['hy-paragraph-text', `${this.variant}`, `${this.placement}`, `${this.headerstyle}`].join(
' '
);
return ( return (
<Host> <Host>
......
...@@ -31,10 +31,11 @@ Basic text paragraph. ...@@ -31,10 +31,11 @@ Basic text paragraph.
## Properties ## Properties
| Property | Attribute | Description | Type | Default | | Property | Attribute | Description | Type | Default |
| ------------- | ------------- | ----------- | -------- | ----------- | | ------------- | ------------- | ----------- | -------- | ------------ |
| `headerstyle` | `headerstyle` | | `string` | `'default'` | | `headerstyle` | `headerstyle` | | `string` | `'default'` |
| `variant` | `variant` | | `string` | `undefined` | | `placement` | `placement` | | `string` | `'internal'` |
| `variant` | `variant` | | `string` | `undefined` |
--- ---
......
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