Skip to main content

command_row

Function command_row 

Source
pub fn command_row(
    source: impl IntoIconSource,
    label: impl Into<String>,
    shortcut: impl Into<String>,
) -> El
Examples found in repository?
examples/polish_calibration.rs (line 300)
288fn command_card() -> El {
289    card([
290        card_header([card_title("Command surface")]),
291        card_content([
292            text_input(
293                "Search commands...",
294                &Selection::default(),
295                "command-search",
296            )
297            .key("metric:command.input")
298            .width(Size::Fill(1.0)),
299            popover_panel([
300                command_row("git-branch", "New branch", "Ctrl+B").key("metric:command.row"),
301                command_row("git-commit", "Commit staged files", "Ctrl+Enter")
302                    .key("command-row-commit"),
303                command_row("refresh-cw", "Refresh repository", "Ctrl+R")
304                    .key("command-row-refresh"),
305                command_row("alert-circle", "Force push", "Danger").key("command-row-force"),
306            ])
307            .width(Size::Fill(1.0)),
308            scroll([form_probe()]).key("form-probe-scroll"),
309        ])
310        .height(Size::Fill(1.0)),
311    ])
312    .key("metric:command.card")
313    .width(Size::Fill(0.8))
314    .height(Size::Fill(1.0))
315}