# Install

## Maven

```xml
<dependency>
    <groupId>de.mate_ds</groupId>
    <artifactId>mate-toolbar-flow</artifactId>
</dependency>
```

# Import

```java
import de.mate_ds.flow.component.toolbar.Toolbar;
import de.mate_ds.flow.component.toolbar.ToolbarVariant;
```

# Variants

## Section toolbar

```java
Toolbar toolbar = new Toolbar();
toolbar.setTitleText("Section title");
toolbar.addThemeVariant(ToolbarVariant.SECTION);
toolbar.add(new Button("Löschen"));
```

## Grid toolbar

```java
Toolbar toolbar = new Toolbar();
toolbar.setTitleText("Grid title");
setStatus("Some status of the grid");
syncLoadingWithGrid(grid);
syncSizeWithGrid(grid);
syncLoadingWithFilterPanel(filterPanel);
toolbar.add(new Button("Löschen"));
```

## Grid toolbar error

```java
Toolbar toolbar = new Toolbar();
toolbar.setTitleText("Grid title");
toolbar.addThemeVariant(ToolbarVariant.ERROR);
setStatus("Error message");
syncLoadingWithGrid(grid);
syncSizeWithGrid(grid);
syncLoadingWithFilterPanel(filterPanel);
toolbar.add(new Button("Löschen"));
```