File size: 1,101 Bytes
2409829
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<script lang="ts">
	import LayoutRow from "@graphite/components/layout/LayoutRow.svelte";
	import IconLabel from "@graphite/components/widgets/labels/IconLabel.svelte";

	export let maximized = false;
</script>

<LayoutRow class="window-button windows minimize" tooltip="Minimize">
	<IconLabel icon={"WindowButtonWinMinimize"} />
</LayoutRow>
{#if !maximized}
	<LayoutRow class="window-button windows maximize" tooltip="Maximize">
		<IconLabel icon={"WindowButtonWinMaximize"} />
	</LayoutRow>
{:else}
	<LayoutRow class="window-button windows restore-down" tooltip="Restore Down">
		<IconLabel icon={"WindowButtonWinRestoreDown"} />
	</LayoutRow>
{/if}
<LayoutRow class="window-button windows close" tooltip="Close">
	<IconLabel icon={"WindowButtonWinClose"} />
</LayoutRow>

<style lang="scss" global>
	.window-button.windows {
		flex: 0 0 auto;
		align-items: center;
		padding: 0 17px;

		svg {
			fill: var(--color-e-nearwhite);
		}

		&:hover {
			background: var(--color-6-lowergray);

			svg {
				fill: var(--color-f-white);
			}
		}

		&.close:hover {
			background: #e81123;
		}
	}
</style>