desktop.js
4 years ago
main.js
2 years ago
mobile.js
2 years ago
tablet-only.js
4 years ago
tablet.js
2 years ago
desktop.js
35 lines
| 1 | /* eslint-disable quotes */ |
| 2 | import buildCSS from '../../../utils/build-css'; |
| 3 | |
| 4 | import { |
| 5 | Component, |
| 6 | } from '@wordpress/element'; |
| 7 | |
| 8 | import { |
| 9 | applyFilters, |
| 10 | } from '@wordpress/hooks'; |
| 11 | |
| 12 | export default class DesktopCSS extends Component { |
| 13 | render() { |
| 14 | const attributes = applyFilters( 'generateblocks.editor.cssAttrs', this.props.attributes, this.props ); |
| 15 | |
| 16 | const { |
| 17 | uniqueId, |
| 18 | removeVerticalGap, |
| 19 | } = attributes; |
| 20 | |
| 21 | let cssObj = []; |
| 22 | |
| 23 | cssObj[ '.gb-grid-column-' + uniqueId ] = [ { |
| 24 | 'margin-bottom': removeVerticalGap ? '0px !important' : false, |
| 25 | } ]; |
| 26 | |
| 27 | cssObj = applyFilters( 'generateblocks.editor.desktopCSS', cssObj, this.props, 'container' ); |
| 28 | |
| 29 | return ( |
| 30 | <style>{ buildCSS( cssObj ) }</style> |
| 31 | ); |
| 32 | } |
| 33 | } |
| 34 | /* eslint-enable quotes */ |
| 35 |