forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into fix-68550/add-cut-block-action
- Loading branch information
Showing
20 changed files
with
238 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
packages/block-editor/src/components/block-icon/stories/index.story.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { box, button, cog, paragraph } from '@wordpress/icons'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import BlockIcon from '../'; | ||
|
||
const meta = { | ||
title: 'BlockEditor/BlockIcon', | ||
component: BlockIcon, | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: | ||
'The `BlockIcon` component allows to display an icon for a block.', | ||
}, | ||
canvas: { sourceState: 'shown' }, | ||
}, | ||
}, | ||
argTypes: { | ||
icon: { | ||
control: 'select', | ||
options: [ 'paragraph', 'cog', 'box', 'button' ], | ||
mapping: { | ||
paragraph, | ||
cog, | ||
box, | ||
button, | ||
}, | ||
description: | ||
'The icon of the block. This can be any of [WordPress Dashicons](https://developer.wordpress.org/resource/dashicons/), or a custom `svg` element.', | ||
table: { | ||
type: { summary: 'string | object' }, | ||
}, | ||
}, | ||
showColors: { | ||
control: 'boolean', | ||
description: 'Whether to show background and foreground colors.', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
}, | ||
}, | ||
className: { | ||
control: 'text', | ||
description: 'Additional CSS class for the icon.', | ||
table: { | ||
type: { summary: 'string' }, | ||
}, | ||
}, | ||
context: { | ||
control: 'text', | ||
description: 'Context where the icon is being used.', | ||
table: { | ||
type: { summary: 'string' }, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Default = { | ||
args: { | ||
icon: 'paragraph', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.