Skip to content

Commit

Permalink
Merge branch 'main' into refactor-components
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Oct 20, 2024
2 parents a887429 + 5a060b9 commit 4c0be50
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions src/settings/global-settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,31 @@ export default function GlobalSettings() {

return (
<>
<Spacer padding={ 4 } marginBottom={ 0 } style={ { borderTop: '1px solid #e0e0e0' } }>
<HStack>
<Spacer
as={ HStack }
padding={ 4 }
marginBottom={ 0 }
style={ { borderTop: '1px solid #e0e0e0' } }
>
<Button
icon={ help }
variant="link"
onClick={ () => setIsHelpModalOpen( true ) }
size="compact"
>
{ __( 'Help', 'flexible-table-block' ) }
</Button>
{ ! isGlobalSettingLoaded && <Spinner /> }
{ isGlobalSettingLoaded && showGlobalSetting && (
<Button
icon={ help }
variant="link"
onClick={ () => setIsHelpModalOpen( true ) }
icon={ cog }
variant="primary"
onClick={ () => setIsSettingModalOpen( true ) }
size="compact"
>
{ __( 'Help', 'flexible-table-block' ) }
{ __( 'Global setting', 'flexible-table-block' ) }
</Button>
{ ! isGlobalSettingLoaded && <Spinner style={ { margin: 0 } } /> }
{ isGlobalSettingLoaded && showGlobalSetting && (
<Button
icon={ cog }
variant="primary"
onClick={ () => setIsSettingModalOpen( true ) }
size="compact"
>
{ __( 'Global setting', 'flexible-table-block' ) }
</Button>
) }
</HStack>
) }
</Spacer>
{ isHelpModalOpen && <HelpModal { ...{ setIsHelpModalOpen } } /> }
{ options && isSettingModalOpen && ( isAdministrator || options?.show_global_setting ) && (
Expand Down

0 comments on commit 4c0be50

Please sign in to comment.