Skip to content

Commit

Permalink
Added facility to apply overflow hidden to a component sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHavoc committed Dec 13, 2016
1 parent 2901ac4 commit 18ef910
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ Key|Value|Description
sample_dark_background|boolean|Set the background of the component sample area to be a dark color.
sample_background_color|string|Override sample background color. This option take precident over the dark background color.
sample_min_height|integer|Astrum detects if a component is hidden at desktop or mobile resolutions by detecting the components rendered height. When it’s hidden in your project CSS, Astrum shows a message to this effect. If the component is absolutely positioned, it has no height so you can set a min-height with this option to ensure it is shown properly and Astrum messaging is shown correctly.
sample_overflow_hidden|boolean|Apply `overflow: hidden;` to the component sample.
disabled_auto_sample_hiding|object|Astrum automatically detects if you've hidden a component at mobile or desktop resolutions in your stylesheets. You can disable this feature using this option. Add `show_on_mobile` and `show_on_desktop` keys to the object with boolean values to set how the component should behave.
disable_code_sample|boolean|Don't display the component code sample.

Expand Down
5 changes: 5 additions & 0 deletions _template/app/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ var ndplComponent = Vue.extend({
if(_this.component.options.sample_min_height) {
styles += 'min-height:' + _this.component.options.sample_min_height + 'px;';
}
if(_this.component.options.sample_overflow_hidden) {
styles += 'overflow: hidden;';
}
if(_this.component.options.sample_background_color) {
styles += 'background-color:' + _this.component.options.sample_background_color + ' !important;';
}

console.log("Got here");
}

return styles;
Expand Down
Loading

0 comments on commit 18ef910

Please sign in to comment.