Skip to content

Commit 079a6ba

Browse files
committed
Export the colours preview application from the library
1 parent 6fd3e2a commit 079a6ba

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ textual: # Show the help for the textual command.
7070
borders: # Show the Textual borders preview.
7171
$(textual) borders
7272

73+
.PHONY: colors
74+
colors: # Show the Textual colours preview.
75+
$(textual) colors
76+
7377
.PHONY: console
7478
console: # Run the textual console
7579
$(textual) console

src/textual_dev/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ def easing() -> None:
214214
@run.command("colors")
215215
def colors() -> None:
216216
"""Explore the design system."""
217-
from textual_dev.previews import colors
217+
from textual_dev.previews import ColorsApp
218218

219-
colors.app.run()
219+
ColorsApp().run()
220220

221221

222222
@run.command("keys")

src/textual_dev/previews/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Provides the preview applications for the textual CLI tool."""
22

33
from .borders import BorderApp
4+
from .colors import ColorsApp
45

5-
__all__ = ["BorderApp"]
6+
__all__ = ["BorderApp", "ColorsApp"]

src/textual_dev/previews/colors.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,5 @@ def on_button_pressed(self, event: Button.Pressed) -> None:
7373
group.scroll_visible(top=True, speed=150)
7474

7575

76-
app = ColorsApp()
77-
7876
if __name__ == "__main__":
79-
app.run()
77+
ColorsApp().run()

0 commit comments

Comments
 (0)