Skip to content

Commit

Permalink
Tweak Global Setting layout
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Oct 20, 2024
1 parent e21666d commit e4d8b26
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/controls/border-radius-control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default function BorderRadiusControl( {
units={ borderRadiusUnits }
min={ 0 }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</div>
) }
Expand Down
4 changes: 2 additions & 2 deletions src/controls/border-spacing-control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function BorderSpacingControl( {
placeholder={ allInputPlaceholder }
onChange={ handleOnChangeAll }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</HStack>
) : (
Expand All @@ -153,7 +153,7 @@ export default function BorderSpacingControl( {
units={ borderSpacingUnits }
onChange={ ( value ) => handleOnChange( value, item.value ) }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</HStack>
) ) }
Expand Down
4 changes: 2 additions & 2 deletions src/controls/border-width-control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default function BorderWidthControl( {
placeholder={ allInputPlaceholder }
onChange={ handleOnChangeAll }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</div>
) }
Expand Down Expand Up @@ -205,7 +205,7 @@ export default function BorderWidthControl( {
onFocus={ () => handleOnFocus( item.value ) }
onChange={ ( value ) => handleOnChange( value, item.value ) }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/controls/padding-control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default function PaddingControl( {
value={ allInputValue }
units={ paddingUnits }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</div>
) }
Expand Down Expand Up @@ -172,7 +172,7 @@ export default function PaddingControl( {
onFocus={ () => handleOnFocus( item.value ) }
onChange={ ( value ) => handleOnChange( value, item.value ) }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</div>
);
Expand Down
15 changes: 7 additions & 8 deletions src/settings/global-settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ export default function GlobalSettings() {
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
Expand All @@ -75,6 +67,13 @@ export default function GlobalSettings() {
{ __( 'Global setting', 'flexible-table-block' ) }
</Button>
) }
<Button
icon={ help }
variant="link"
onClick={ () => setIsHelpModalOpen( true ) }
label={ __( 'Help', 'flexible-table-block' ) }
size="compact"
/>
</Spacer>
{ isHelpModalOpen && <HelpModal { ...{ setIsHelpModalOpen } } /> }
{ options && isSettingModalOpen && ( isAdministrator || options?.show_global_setting ) && (
Expand Down
4 changes: 2 additions & 2 deletions src/settings/global-settings/setting-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default function SettingModal( { options, isAdministrator, setIsSettingMo
} );
} }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</Spacer>
<Spacer
Expand All @@ -273,7 +273,7 @@ export default function SettingModal( { options, isAdministrator, setIsSettingMo
} );
} }
size="__unstable-large"
__unstableInputWidth="110px"
__unstableInputWidth="100px"
/>
</Spacer>
<Spacer
Expand Down

0 comments on commit e4d8b26

Please sign in to comment.