mirror of https://github.com/Textualize/rich.git
formatting
This commit is contained in:
parent
7593e4b271
commit
d21823440f
|
@ -2,9 +2,11 @@ from rich import print
|
||||||
from rich.console import render_group
|
from rich.console import render_group
|
||||||
from rich.panel import Panel
|
from rich.panel import Panel
|
||||||
|
|
||||||
|
|
||||||
@render_group()
|
@render_group()
|
||||||
def get_panels():
|
def get_panels():
|
||||||
yield Panel("Hello", style="on blue")
|
yield Panel("Hello", style="on blue")
|
||||||
yield Panel("World", style="on red")
|
yield Panel("World", style="on red")
|
||||||
|
|
||||||
|
|
||||||
print(Panel(get_panels()))
|
print(Panel(get_panels()))
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from rich import print
|
from rich import print
|
||||||
from rich.padding import Padding
|
from rich.padding import Padding
|
||||||
|
|
||||||
test = Padding("Hello", (2, 4), style="on blue", expand=False)
|
test = Padding("Hello", (2, 4), style="on blue", expand=False)
|
||||||
print(test)
|
print(test)
|
||||||
|
|
Loading…
Reference in New Issue