Skip to content

Commit

Permalink
Style oik/contact-field blocks using CSS grid rather than table #207
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Sep 10, 2022
1 parent e209bce commit 38d32f3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 13 additions & 0 deletions src/oik-contact-field/editor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.wp-block-oik-contact-field {
display: grid;
gap: 20px;
grid-template-columns: 1fr 3fr;

label {

}
div.field {

}

}
13 changes: 5 additions & 8 deletions src/oik-contact-field/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Herb Miller @bobbingwide
*/
//import './style.scss';
//import './editor.scss';
import './editor.scss';


import { __ } from '@wordpress/i18n';
Expand Down Expand Up @@ -92,15 +92,12 @@ registerBlockType(
</InspectorControls>

<div { ...blockProps}>
<tr>
<td>
<div className="label">
<label for={ attributes.name }>{attributes.label}</label>
</td>
<td>
</div>
<div className="field">
<ContactFieldControl type={attributes.type} name={attributes.name} required={attributes.required} />

</td>
</tr>
</div>
</div>


Expand Down

0 comments on commit 38d32f3

Please sign in to comment.