diff --git a/docs/features/README.md b/docs/features/README.md index e07ccc9..fe1fb0e 100644 --- a/docs/features/README.md +++ b/docs/features/README.md @@ -13,3 +13,4 @@ Most code for features can be found in the [features](../../src/features) direct - [Windows](windows/README.md) - [Taskbar](taskbar/README.md) - [Settings](settings/README.md) +- [Modals](modals/README.md) diff --git a/docs/features/modals/README.md b/docs/features/modals/README.md new file mode 100644 index 0000000..268f920 --- /dev/null +++ b/docs/features/modals/README.md @@ -0,0 +1,9 @@ +[← Back](../README.md) + +# Modals + +Modals are modular components that can be instantiated by other components. This feature is mainly used for context menus that are instantiated by windows. + +Modals prominently take a position and a callback function as input. When the modal is closed, the callback function is called with optional arguments that usually include whatever the user entered as input while the modal was active. E.g.: A confirmation dialog is usually instantiated at the center of the screen and returns "yes" or "no" to the callback function, depending on which button the user clicked. + +Even though modals are very similar to windows, they are also very different. You can look at modals as mini sub-windows that each have their own styling, as opposed to windows that all have a header with a title and some buttons. \ No newline at end of file