Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook: Add stories for URLInputButton component #68320

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Internal dependencies
*/
import URLInputButton from '../button';

const meta = {
title: 'BlockEditor/URLInputButton',
component: URLInputButton,
parameters: {
docs: {
canvas: { sourceState: 'shown' },
description: {
component:
'Render a URL input button that pops up an input to search for and select a post or enter any arbitrary URL.',
},
},
},
argTypes: {
url: {
control: 'text',
description:
'This should be set to the attribute (or component state) property used to store the URL.',
type: {
required: true,
name: 'string',
},
},
onChange: {
control: {
type: null,
},
description: `Called when the value changes. The second parameter is null unless the user selects a post from the suggestions dropdown.`,
type: {
required: true,
name: 'function',
},
action: 'onChange',
},
},
};

export default meta;

export const Default = {};
Loading