Skip to content

Commit 7ce6e11

Browse files
committed
Remove knobs
1 parent 1a30fc5 commit 7ce6e11

File tree

1 file changed

+6
-11
lines changed
  • packages/components/src/combobox-control/stories

1 file changed

+6
-11
lines changed

packages/components/src/combobox-control/stories/index.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ import { useState } from '@wordpress/element';
88
*/
99
import ComboboxControl from '../';
1010

11-
/**
12-
* External dependencies
13-
*/
14-
import { boolean } from '@storybook/addon-knobs';
15-
1611
const countries = [
1712
{ name: 'Afghanistan', code: 'AF' },
1813
{ name: 'Åland Islands', code: 'AX' },
@@ -262,9 +257,6 @@ const countries = [
262257
export default {
263258
title: 'Components/ComboboxControl',
264259
component: ComboboxControl,
265-
parameters: {
266-
knobs: { disable: false },
267-
},
268260
};
269261

270262
const mapCountryOption = ( country ) => ( {
@@ -274,7 +266,7 @@ const mapCountryOption = ( country ) => ( {
274266

275267
const countryOptions = countries.map( mapCountryOption );
276268

277-
function CountryCodeComboboxControl() {
269+
function CountryCodeComboboxControl( { allowReset } ) {
278270
const [ value, setValue ] = useState( null );
279271

280272
return (
@@ -284,10 +276,13 @@ function CountryCodeComboboxControl() {
284276
onChange={ setValue }
285277
label="Select a country"
286278
options={ countryOptions }
287-
allowReset={ boolean( 'allowReset', false ) }
279+
allowReset={ allowReset }
288280
/>
289281
<p>Value: { value }</p>
290282
</>
291283
);
292284
}
293-
export const _default = () => <CountryCodeComboboxControl />;
285+
export const _default = CountryCodeComboboxControl.bind( {} );
286+
_default.args = {
287+
allowReset: false,
288+
};

0 commit comments

Comments
 (0)