You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the need, from some designs in Todoist's new task details view, to give the impression that there's a button inside another button. Specifically, to have an icon-button in the context of where the endIcon of a Button would appear:
Example
CleanShot.2022-05-09.at.21.48.25.mp4
Problems that this would solve
We're currently achieving this in the short term using a CSS hack to show the endIcon only when the button is hovered or its focus is visible. Then we provide a endIcon={<SvgComponent onClick={…} />}. But this is ignoring two larger issues:
The inner icon is not really a button, so it is not accessible.
Even if we made it a button (e.g. endIcon={<button type="button"><svg /></button>}), it would be incorrect markup to have a button inside another button.
Possible implementations
We would need a new component that provides an outer box containing the two buttons, but giving the impression that the main button fills this entire box, while the icon-only button sits also inside this outer bot, but outside the first button.
We already do something like this in Todoist's LabelPill component (closed source, but we may open-source a more generic version of it in the process of doing this work).
The text was updated successfully, but these errors were encountered:
🚀 Feature request
Motivation
We have the need, from some designs in Todoist's new task details view, to give the impression that there's a button inside another button. Specifically, to have an icon-button in the context of where the
endIcon
of aButton
would appear:Example
CleanShot.2022-05-09.at.21.48.25.mp4
Problems that this would solve
We're currently achieving this in the short term using a CSS hack to show the
endIcon
only when the button is hovered or its focus is visible. Then we provide aendIcon={<SvgComponent onClick={…} />}
. But this is ignoring two larger issues:endIcon={<button type="button"><svg /></button>}
), it would be incorrect markup to have a button inside another button.Possible implementations
We would need a new component that provides an outer box containing the two buttons, but giving the impression that the main button fills this entire box, while the icon-only button sits also inside this outer bot, but outside the first button.
We already do something like this in Todoist's
LabelPill
component (closed source, but we may open-source a more generic version of it in the process of doing this work).The text was updated successfully, but these errors were encountered: