Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

add fontSize option #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -19,3 +19,4 @@ useful-markdown-card
Options:

- `padding` - Adjust padding of markdown card (default `'16px'`)
- `fontSize` - Adjust font-size of markdown card
4 changes: 4 additions & 0 deletions useful-markdown-card.js
Expand Up @@ -54,6 +54,7 @@ class UsefulMarkdownCard extends Polymer.Element {
this.title = config.title;
this.content = config.content;
this.padding = config.padding || null;
this.fontSize = config.fontSize|| null;
if(!this.padding){
if(this.title){
this.padding = '0 16px 16px';
Expand Down Expand Up @@ -89,6 +90,9 @@ class UsefulMarkdownCard extends Polymer.Element {
if(!this.$.md.style.padding){
this.$.md.style.padding = this.padding;
}
if(!this.$.md.style.fontSize){
this.$.md.style.fontSize= this.fontSize;
}
}
this.renderedContent = this.process(this.content);
}
Expand Down