diff --git a/src/components/controls/index.tsx b/src/components/controls/index.tsx index ff56c5b..1d5f134 100644 --- a/src/components/controls/index.tsx +++ b/src/components/controls/index.tsx @@ -106,6 +106,7 @@ const Controls = ( { settings, piano, onChange }: Props ) => { return (
{ onChange={ onVolumeChange } /> { {
) } { disabled={ instrument === 'synthesizer' } /> { size="compact" /> { label={ __( 'Help', 'piano-block' ) } icon={ help } onClick={ () => setIsHelpOpen( true ) } - size="compact" + size="small" /> { isHelpOpen && setIsHelpOpen( false ) } /> } diff --git a/src/components/controls/style.scss b/src/components/controls/style.scss index eb432fd..a5eef10 100644 --- a/src/components/controls/style.scss +++ b/src/components/controls/style.scss @@ -1,3 +1,5 @@ +@import "../../variables"; + .piano-block-controls { position: relative; box-sizing: border-box; @@ -6,7 +8,7 @@ gap: $grid-unit-20; align-items: flex-start; width: calc(100% - $grid-unit-40); - max-width: 818px; + max-width: $white-key-width * $white-key-count - $grid-unit-40; padding: $grid-unit-10 $grid-unit-60 $grid-unit-10 $grid-unit-20; margin: 0 auto; background: #fff; @@ -20,23 +22,7 @@ } } - .components-base-control__label { - display: block; - font-size: 11px; - font-weight: 500; - line-height: 1.4; - } - - .components-base-control__field { - margin-bottom: 0; - } - - .components-select-control__input:focus { - outline: none; - } - .components-toggle-control { - margin-bottom: 0; .components-flex { flex-flow: column-reverse; @@ -50,10 +36,6 @@ line-height: 1.4; text-transform: uppercase; } - - .components-form-toggle { - display: inline-flex; - } } .piano-block-controls__synthesizer-toggle { diff --git a/src/components/keyboard/style.scss b/src/components/keyboard/style.scss index ce3f7c2..5a8747e 100644 --- a/src/components/keyboard/style.scss +++ b/src/components/keyboard/style.scss @@ -1,7 +1,4 @@ -$black-key-width: $grid-unit-40; -$white-key-width: $grid-unit-50; -$white-key-height: $grid-unit-10 * 24; -$white-key-count: 17; +@import "../../variables"; .piano-block-keyboard { position: relative; diff --git a/src/components/synthesizer-setting/index.tsx b/src/components/synthesizer-setting/index.tsx index bcd4be0..5382a32 100644 --- a/src/components/synthesizer-setting/index.tsx +++ b/src/components/synthesizer-setting/index.tsx @@ -7,6 +7,7 @@ import { Button, RangeControl, SelectControl, + __experimentalGrid as Grid, __experimentalVStack as VStack, } from '@wordpress/components'; @@ -122,8 +123,9 @@ const SynthesizerSetting = ( { synthesizerSetting, onChange }: Props ) => { }; return ( - + { onChange={ onOscillatorTypeChange } size="compact" /> -
+ { EMVELOPE_CONTROLS.map( ( { label, parameter, max } ) => ( { onChange={ ( value ) => onEnvelopeChange( parameter, value ) } /> ) ) } -
+