Skip to content

Commit

Permalink
Remove whitespace in tab definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 2, 2024
1 parent ec39515 commit 0ab21ae
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions doc/how_to/custom_components/esm/custom_layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ This example will show you how to create a *split* layout containing two objects
::::{tab-set}

:::{tab-item} `JSComponent`

```{pyodide}
import panel as pn
Expand Down Expand Up @@ -88,11 +87,9 @@ split_js = SplitJS(
)
split_js.servable()
```

:::

:::{tab-item} `ReactComponent`

```{pyodide}
import panel as pn
Expand Down Expand Up @@ -162,11 +159,9 @@ split_react = SplitReact(
)
split_react.servable()
```

:::

:::{tab-item} `AnyWidgetComponent`

```{pyodide}
import panel as pn
Expand Down Expand Up @@ -261,25 +256,20 @@ Let's verify that the layout will automatically update when the `object` is chan
```{pyodide}
split_js.right=pn.pane.Markdown("Hi. I'm a `Markdown` pane replacing the `CodeEditor` widget!", sizing_mode="stretch_both")
```

:::

:::{tab-item} `ReactComponent`

```{pyodide}
split_react.right=pn.pane.Markdown("Hi. I'm a `Markdown` pane replacing the `CodeEditor` widget!", sizing_mode="stretch_both")
```

:::

:::

:::{tab-item} `AnyWidgetComponent`

```{pyodide}
split_anywidget.right=pn.pane.Markdown("Hi. I'm a `Markdown` pane replacing the `CodeEditor` widget!", sizing_mode="stretch_both")
```

:::

::::
Expand All @@ -289,7 +279,6 @@ Now, let's change it back:
::::{tab-set}

:::{tab-item} `JSComponent`

```{pyodide}
split_js.right=pn.widgets.CodeEditor(
value="Right",
Expand All @@ -299,11 +288,9 @@ split_js.right=pn.widgets.CodeEditor(
language="python",
)
```

:::

:::{tab-item} `ReactComponent`

```{pyodide}
split_react.right=pn.widgets.CodeEditor(
value="Right",
Expand All @@ -313,11 +300,9 @@ split_react.right=pn.widgets.CodeEditor(
language="python",
)
```

:::

:::{tab-item} `AnyWidgetComponent`

```{pyodide}
split_anywidget.right=pn.widgets.CodeEditor(
value="Right",
Expand All @@ -327,7 +312,6 @@ split_anywidget.right=pn.widgets.CodeEditor(
language="python",
)
```

:::

::::
Expand All @@ -339,7 +323,6 @@ A Panel `Column` or `Row` works as a list of objects. It is *list-like*. In this
::::{tab-set}

:::{tab-item} `JSComponent`

```{pyodide}
import panel as pn
import param
Expand Down Expand Up @@ -416,7 +399,6 @@ You must list `ListLike, JSComponent` in exactly that order when you define the
:::

:::{tab-item} `ReactComponent`

```{pyodide}
import panel as pn
import param
Expand Down Expand Up @@ -483,11 +465,9 @@ grid_react.servable()
```

You must list `ListLike, ReactComponent` in exactly that order when you define the class! Reversing the order to `ReactComponent, ListLike` will not work.

:::

:::{tab-item} `AnyWidgetComponent`

```{pyodide}
import panel as pn
import param
Expand Down Expand Up @@ -572,7 +552,6 @@ You can now use `[...]` indexing and methods like `.append`, `.insert`, `pop`, e
::::{tab-set}

:::{tab-item} `JSComponent`

```{pyodide}
grid_js.append(
pn.widgets.CodeEditor(
Expand All @@ -582,11 +561,9 @@ grid_js.append(
)
)
```

:::

:::{tab-item} `ReactComponent`

```{pyodide}
grid_react.append(
pn.widgets.CodeEditor(
Expand All @@ -596,11 +573,9 @@ grid_react.append(
)
)
```

:::

:::{tab-item} `AnyWidgetComponent`

```{pyodide}
grid_anywidget.append(
pn.widgets.CodeEditor(
Expand All @@ -610,7 +585,6 @@ grid_anywidget.append(
)
)
```

:::

::::
Expand All @@ -620,27 +594,21 @@ Let's remove it again:
::::{tab-set}

:::{tab-item} `JSComponent`

```{pyodide}
grid_js.pop(-1)
```

:::

:::{tab-item} `ReactComponent`

```{pyodide}
grid_react.pop(-1)
```

:::

:::{tab-item} `AnyWidgetComponent`

```{pyodide}
grid_anywidget.pop(-1)
```

:::

::::

0 comments on commit 0ab21ae

Please sign in to comment.