Skip to content

Commit

Permalink
Apply Stack layout for settings modal
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Mar 7, 2024
1 parent 8e0e7b6 commit f6183f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 9 additions & 3 deletions src/components/synthesizer-setting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
*/
import { __ } from '@wordpress/i18n';
import { useEffect, useRef } from '@wordpress/element';
import { Button, RangeControl, SelectControl } from '@wordpress/components';
import {
Button,
RangeControl,
SelectControl,
// @ts-ignore: has no exported member
__experimentalVStack as VStack,
} from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -109,7 +115,7 @@ const SynthesizerSetting = ( { synthesizerSetting, onChange }: Props ) => {
};

return (
<div className="piano-block-synthesizer-setting">
<VStack className="piano-block-synthesizer-setting">
<SelectControl
label={ __( 'Oscillator Type', 'piano-block' ) }
autoComplete="off"
Expand Down Expand Up @@ -146,7 +152,7 @@ const SynthesizerSetting = ( { synthesizerSetting, onChange }: Props ) => {
>
{ __( 'Reset envelope', 'piano-block' ) }
</Button>
</div>
</VStack>
);
};

Expand Down
3 changes: 0 additions & 3 deletions src/components/synthesizer-setting/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
display: flex;
flex-wrap: wrap;
gap: 0 $grid-unit-20;
margin-top: $grid-unit-10;

.components-range-control {
width: calc(50% - $grid-unit-10);
Expand All @@ -29,12 +28,10 @@
display: block;
width: 100%;
height: $grid-unit-10 * 10;
margin: $grid-unit-10 0;
border: $border-width solid var(--wp-admin-theme-color, #007cba);
}

.piano-block-synthesizer-setting__reset {
display: block;
margin-left: auto;
}
}

0 comments on commit f6183f9

Please sign in to comment.