Conversation
|
I dig this a lot. The link on the right works well, it would be good to get this merged in and tested so we can really feel it. It doesn't work too well responsively though. Otherwise, thumbs up! |
|
I am not sure about the markup here; ended up adding a wrapping div so alignment worked more precisely. |
blocks/library/button/index.js
Outdated
There was a problem hiding this comment.
This should be a component like Editable so we don't rely on reusing classes.
There was a problem hiding this comment.
It would also simplify the interface for developers.
blocks/library/button/index.js
Outdated
Render link outside the button. Allow opening button link externally. Disable focusing.
This uses the default link-modal implemented for Editable, but displays it all the time. Positioninig is determined by block alignment. Position URL input to the left when button is aligned right.
| * @param {string} align Alignment value | ||
| * @return {Function} Attribute setter | ||
| */ | ||
| function applyOrUnset( align ) { |
There was a problem hiding this comment.
Per @iseulde's comment at #401 (comment), maybe there's value in allowing the control to be associated with an attribute to toggle, even just as an optional convenience.
Also, this has since been renamed in the image block as toggleAlignment.
Button
Starts a simple block to easily add a button to a post.