Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better way to add screen height to blocks #17

Merged
merged 4 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [3.3.1](https://github.com/eea/volto-block-style/compare/3.3.0...3.3.1)

- Update package.json [`790d878`](https://github.com/eea/volto-block-style/commit/790d8786a15f0fea3dabaa4ac347b97c92a4f369)
- Better way to add screen height to blocks [`2901621`](https://github.com/eea/volto-block-style/commit/2901621636b0d80de40e029d6cf90410d8bfef6f)

#### [3.3.0](https://github.com/eea/volto-block-style/compare/3.2.5...3.3.0)

> 4 June 2021
- Develop [`#16`](https://github.com/eea/volto-block-style/pull/16)
- Cleanup Jenkinsfile [`dfa2790`](https://github.com/eea/volto-block-style/commit/dfa2790afb144f8a38fc0f3459ff37bb9bc4352c)
- Bump minor release [`a571d9e`](https://github.com/eea/volto-block-style/commit/a571d9ea1c4ac026af6eb973fe0b3386e4941466)
- Jenkins dependencies [`90f047b`](https://github.com/eea/volto-block-style/commit/90f047b644e0bf8d20bda7452eb68175f13bb3a8)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-block-style",
"version": "3.3.0",
"version": "3.3.1",
"description": "volto-block-style: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand All @@ -24,7 +24,7 @@
"react-color": "~2.18.1"
},
"devDependencies": {
"@eeacms/volto-resize-helper": "^0.1.1",
"@eeacms/volto-resize-helper": "^0.2.0",
"@cypress/code-coverage": "^3.9.5",
"babel-plugin-transform-class-properties": "^6.24.1"
},
Expand Down
6 changes: 4 additions & 2 deletions src/StyleWrapper/StyleWrapperView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ export function getInlineStyles(data, props = {}) {
...(data.textColor ? { color: data.textColor } : {}),
...(data.textAlign ? { textAlign: data.textAlign } : {}),
...(data.fontSize ? { fontSize: data.fontSize } : {}),
...(data.isScreenHeight && props.screen.screenHeight
...(data.isScreenHeight && props.screen.height
? {
minHeight: (
props.screen.screenHeight - props.screen.offsetHeight
props.screen.height -
props.screen.browserToolbarHeight -
props.screen.content.offsetTop
).toPixel(),
}
: {}),
Expand Down