Use different icon when output is amplified (#775)

This commit is contained in:
Jonatan Kłosko 2021-12-08 16:30:52 +01:00 committed by GitHub
parent 8c4ef89685
commit a133a7070d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -112,6 +112,18 @@ solely client-side operations.
left: calc(-45vw + 50%); left: calc(-45vw + 50%);
} }
[data-element="cell"][data-js-amplified]
[data-element="amplify-outputs-button"]
[data-element="zoom-in-icon"] {
@apply hidden;
}
[data-element="cell"]:not([data-js-amplified])
[data-element="amplify-outputs-button"]
[data-element="zoom-out-icon"] {
@apply hidden;
}
[data-element="session"]:not([data-js-side-panel-content]) [data-element="session"]:not([data-js-side-panel-content])
[data-element="side-panel"] { [data-element="side-panel"] {
@apply hidden; @apply hidden;

View file

@ -99,7 +99,8 @@ defmodule LivebookWeb.SessionLive.CellComponent do
<span class="tooltip top" data-tooltip="Amplify output" data-element="amplify-outputs-button"> <span class="tooltip top" data-tooltip="Amplify output" data-element="amplify-outputs-button">
<button class="icon-button" <button class="icon-button"
aria-label="amplify outputs"> aria-label="amplify outputs">
<.remix_icon icon="zoom-in-line" class="text-xl" /> <.remix_icon icon="zoom-in-line" class="text-xl" data-element="zoom-in-icon" />
<.remix_icon icon="zoom-out-line" class="text-xl" data-element="zoom-out-icon" />
</button> </button>
</span> </span>
<.cell_settings_button cell_id={@cell_view.id} socket={@socket} session_id={@session_id} /> <.cell_settings_button cell_id={@cell_view.id} socket={@socket} session_id={@session_id} />