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 LetterSpacingControl story #67342

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,75 @@
/**
* Internal dependencies
*/
import LetterSpacingControl from '../';

const meta = {
title: 'BlockEditor/LetterSpacingControl',
component: LetterSpacingControl,
parameters: {
docs: {
canvas: { sourceState: 'shown' },
description: {
component:
'The `LetterSpacingControl` component renders a UnitControl that lets the user enter a numeric value and select a unit, for example `px` or `rem`.',
},
},
},
argTypes: {
onChange: {
action: 'onChange',
description: 'A callback function invoked when the value is changed.',
table: {
type: {
summary: 'function',
},
},
},
value: {
control: {
type: null,
},
table: {
type: {
summary: 'number',
},
},
description: 'The current value of the letter spacing setting.',
},
__next40pxDefaultSize: {
control: {
type: 'boolean',
},
description:
'Defines the default size of elements within a block or component.',
table: {
type: {
summary: 'boolean',
},
},
},
__unstableInputWidth: {
description:
'Input width to pass through to inner UnitControl. Should be a valid CSS value.',
control: {
type: null,
},
table: {
type: {
summary: 'string|number|undefined',
},
},
},
},
};

export default meta;

/**
* Default story shows the LetterSpacingControl.
*/
export const Default = {
args: {
value: 10,
},
};
Loading