diff --git a/src/data-sources/components/AddDataSourceDropdown.tsx b/src/data-sources/components/AddDataSourceDropdown.tsx index 070d2bca..7f5e1d31 100644 --- a/src/data-sources/components/AddDataSourceDropdown.tsx +++ b/src/data-sources/components/AddDataSourceDropdown.tsx @@ -25,11 +25,15 @@ export const AddDataSourceDropdown = () => { className="rdb-settings-page_add-data-source-dropdown" icon={ null } label={ __( 'Connect new data source', 'remote-data-blocks' ) } + popoverProps={ { + offset: 8, + } } text={ __( 'Connect New', 'remote-data-blocks' ) } toggleProps={ { className: 'rdb-settings-page_add-data-source-btn', variant: 'primary', showTooltip: false, + __next40pxDefaultSize: true, } } children={ ( { onClose } ) => ( @@ -60,18 +64,19 @@ export const AddDataSourceDropdown = () => { value: 'generic-http', }, ].map( ( { icon, label, value } ) => ( - { - onAddDataSource( value ); - onClose(); - } } - > - { label } - +
+ { + onAddDataSource( value ); + onClose(); + } } + > + { label } + +
) ) }
) } diff --git a/src/settings/icons/GoogleSheetsIcon.tsx b/src/settings/icons/GoogleSheetsIcon.tsx index f190b005..4b81a1b4 100644 --- a/src/settings/icons/GoogleSheetsIcon.tsx +++ b/src/settings/icons/GoogleSheetsIcon.tsx @@ -1,15 +1,156 @@ import { SVG } from '@wordpress/primitives'; export const GoogleSheetsIcon: JSX.Element = ( - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); diff --git a/src/settings/index.scss b/src/settings/index.scss index 9b1539f4..b2e16829 100644 --- a/src/settings/index.scss +++ b/src/settings/index.scss @@ -91,15 +91,18 @@ body { padding: 24px 48px; border-bottom: 1px solid var(--Alias-border-border-secondary, #ebebeb); - p { margin-bottom: 0; } - .rdb-settings-page_add-data-source-dropdown { grid-area: 1 / 2 / span 1 / span 1; justify-self: end; + align-self: center; + + .rdb-settings-page_add-data-source-btn.is-opened { + background: #1d35b4; + } } } } @@ -107,18 +110,23 @@ body { /* Add new source menu */ .components-menu-group { - div { - display: flex; + > div { + display: grid; + grid-template-columns: repeat(3, 1fr); width: 368px; - align-items: flex-start; - align-content: flex-start; + align-items: start; + align-content: start; gap: 8px; padding: 8px 8px 16px 8px; - flex-wrap: wrap; + + .rdb-settings-page_add-data-source-btn-wrapper { + height: 100%; + } .components-button.has-icon.has-text { display: flex; width: 112px; + height: 101px; padding: var(--Spacing-Spacing-Base, 16px); flex-direction: column; align-items: center; @@ -130,16 +138,33 @@ body { } + svg { + width: 40px; + height: 40px; + padding: 4px; + } + .components-menu-item__item { min-width: unset; margin-right: unset; - text-wrap: auto; text-align: center; } } - .rdb-settings-page_add-data-source-btn-salesforce-b2c svg { - width: 50px; + .components-button.has-icon.has-text.rdb-settings-page_add-data-source-btn-generic-http svg { + padding: 8px; + } + + .components-button.has-icon.has-text.rdb-settings-page_add-data-source-btn-salesforce-b2c { + + svg { + padding: 0; + } + + span.components-menu-item__item { + text-wrap: auto; + min-width: 112px; + } } } }