From f7fed9a0cf666c1e0e663c6b63585d00859e8c86 Mon Sep 17 00:00:00 2001 From: Jeff Ong Date: Wed, 15 Feb 2023 15:53:39 -0500 Subject: [PATCH] Cleanup manage fonts UI. --- admin/class-manage-fonts.php | 10 +++++---- src/fonts-context.js | 6 +++--- src/manage-fonts/font-face.js | 2 +- src/manage-fonts/font-family.js | 1 - src/manage-fonts/manage-fonts.css | 35 ++++++++++++++++++++++++++++++- 5 files changed, 44 insertions(+), 10 deletions(-) diff --git a/admin/class-manage-fonts.php b/admin/class-manage-fonts.php index 9b91461f..15e97d39 100644 --- a/admin/class-manage-fonts.php +++ b/admin/class-manage-fonts.php @@ -91,7 +91,7 @@ function load_fonts_react_app () { // Enqueue CSS of the app wp_enqueue_style( 'fonts-app', plugins_url( 'build/index.css', __DIR__ ), array(), $asset_file['version'] ); - + // Load our app.js. array_push( $asset_file['dependencies'], 'wp-i18n' ); wp_enqueue_script( 'create-block-theme-app', plugins_url( 'build/index.js', __DIR__ ), $asset_file['dependencies'], $asset_file['version'] ); @@ -130,9 +130,11 @@ function manage_fonts_admin_page () { ?>
-

- - +
+

+ + +

diff --git a/src/fonts-context.js b/src/fonts-context.js index a50c82c3..ab3f1f7a 100644 --- a/src/fonts-context.js +++ b/src/fonts-context.js @@ -15,21 +15,21 @@ export const DEMO_DEFAULTS = { text: DEFAULT_HEADING_TEXT, size: 40, lineHeight: 1.1, - margin: "0.5em", + margin: "0.5em 0", component: "h2", }, sentence: { text: DEFAULT_SENTENCE_TEXT, size: 24, lineHeight: 1.3, - margin: "0.5em", + margin: "0.5em 0", component: "p", }, paragraph: { text: DEFAULT_PARAGRAPH_TEXT, size: 16, lineHeight: 1.5, - margin: "0.5em", + margin: "0.5em 0", component: "p", }, }; diff --git a/src/manage-fonts/font-face.js b/src/manage-fonts/font-face.js index df4c1ad7..dddbfce6 100644 --- a/src/manage-fonts/font-face.js +++ b/src/manage-fonts/font-face.js @@ -37,7 +37,7 @@ function FontFace ( { {/* */} - { deleteFontFace && } + { deleteFontFace && } ); } diff --git a/src/manage-fonts/font-family.js b/src/manage-fonts/font-family.js index 29488644..70f5a46e 100644 --- a/src/manage-fonts/font-family.js +++ b/src/manage-fonts/font-family.js @@ -26,7 +26,6 @@ function FontFamily ( { fontFamily, fontFamilyIndex, deleteFontFamily, deleteFon