-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Polish the button #3427
Polish the button #3427
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
import { IconButton, PanelBody } from '@wordpress/components'; | ||
import { Dashicon, IconButton, PanelBody } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
|
@@ -93,17 +93,6 @@ registerBlockType( 'core/button', { | |
} } | ||
keepPlaceholderOnFocus | ||
/> | ||
{ focus && | ||
<form | ||
className="blocks-format-toolbar__link-modal" | ||
onSubmit={ ( event ) => event.preventDefault() }> | ||
<UrlInput | ||
value={ url } | ||
onChange={ ( value ) => setAttributes( { url: value } ) } | ||
/> | ||
<IconButton icon="editor-break" label={ __( 'Apply' ) } type="submit" /> | ||
</form> | ||
} | ||
{ focus && | ||
<InspectorControls key="inspector"> | ||
<BlockDescription> | ||
|
@@ -130,6 +119,18 @@ registerBlockType( 'core/button', { | |
</InspectorControls> | ||
} | ||
</span>, | ||
focus && ( | ||
<form | ||
className="blocks-format-toolbar__inline-link-modal" | ||
onSubmit={ ( event ) => event.preventDefault() }> | ||
<Dashicon icon="admin-links" /> | ||
<UrlInput | ||
value={ url } | ||
onChange={ ( value ) => setAttributes( { url: value } ) } | ||
/> | ||
<IconButton icon="editor-break" label={ __( 'Apply' ) } type="submit" /> | ||
</form> | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jasmussen Yep, travis is failing because of a missing trailing comma after this parenthesis. You should definitely install an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💓💓👍🌌 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have a nice weekend Joen :) |
||
]; | ||
}, | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not want to share the style of this class with other blocks, it may make sense to rename the classname to match our guidelines. Something like
blocks-button__inline-link
. Ans style it as part of theeditor.scss
of the button block