Skip to content

Commit

Permalink
Merge pull request #11 from Code-Amp/beta-9
Browse files Browse the repository at this point in the history
Beta 9
  • Loading branch information
rmorse authored Feb 17, 2024
2 parents 4d77b11 + 450a752 commit dbdf3c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions components/resource-select-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const ResourceSelectControl =
secondaryActionLabel = __( 'Add new', 'codeamp-block-components' ),
loadingLabel = __( 'Loading', 'codeamp-block-components' ),
showPrimaryAction = true,
disabled = false,
showSecondaryAction = true,
defaultOption,
options,
Expand Down Expand Up @@ -65,6 +66,7 @@ export const ResourceSelectControl =
className={
'codeamp-components-resource-select-control__add_button'
}
disabled={ disabled }
onClick={ onSecondaryAction }
{ ...secondaryActionProps }
>
Expand All @@ -78,11 +80,13 @@ export const ResourceSelectControl =
options={ allResourceOptions }
className={ 'codeamp-components-resource-select-control__select' }
onChange={ onChange }
disabled={ disabled }
/>
{ showPrimaryAction && (
<Button
onClick={ onPrimaryAction }
variant="secondary"
disabled={ disabled }
// disabled={ ! editReady }
className={
'codeamp-components-resource-select-control__edit_button'
Expand Down
4 changes: 2 additions & 2 deletions components/resource-select-control/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
}
margin-bottom: 8px;
}
&__edit_button {
&__edit_button.components-button.is-secondary {
height: auto;
margin-bottom: 8px;
margin-bottom: 0;
}
&__select {
width: auto;
Expand Down

0 comments on commit dbdf3c3

Please sign in to comment.