From 22818bb7ffab66611687e21c606e047982add357 Mon Sep 17 00:00:00 2001 From: Alquen Antonio Sarmiento Date: Tue, 15 Oct 2024 15:26:09 +0800 Subject: [PATCH] feat: admin toolbar setting --- .../admin-toolbar-setting/editor.scss | 7 +++ src/components/admin-toolbar-setting/index.js | 63 +++++++++++++++++++ src/welcome/admin.js | 58 ++++++++--------- 3 files changed, 99 insertions(+), 29 deletions(-) create mode 100644 src/components/admin-toolbar-setting/editor.scss create mode 100644 src/components/admin-toolbar-setting/index.js diff --git a/src/components/admin-toolbar-setting/editor.scss b/src/components/admin-toolbar-setting/editor.scss new file mode 100644 index 000000000..11f15bb4d --- /dev/null +++ b/src/components/admin-toolbar-setting/editor.scss @@ -0,0 +1,7 @@ +.ugb-admin-toolbar-setting { + display: flex; + padding: 10px; + .ugb-button-component { + width: 100%; + } +} diff --git a/src/components/admin-toolbar-setting/index.js b/src/components/admin-toolbar-setting/index.js new file mode 100644 index 000000000..8b77ca052 --- /dev/null +++ b/src/components/admin-toolbar-setting/index.js @@ -0,0 +1,63 @@ +import AdminBaseSetting from '../admin-base-setting' +import Button from '../button' +import { ButtonGroup } from '@wordpress/components' +import { __ } from '@wordpress/i18n' + +const AdminToolbarSetting = props => { + return ( + + { + const isSelected = props.value ? props.value === option.value : props.placeholder === option.value + const tabindex = isSelected ? '0' : '-1' + + return