mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-23 18:15:03 +02:00
83 lines
2.2 KiB
Svelte
83 lines
2.2 KiB
Svelte
<!--
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
//
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License. You may
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
//
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
-->
|
|
|
|
<script lang="ts">
|
|
import type { IntlString } from '@anticrm/platform'
|
|
import { Label, ScrollBox } from '@anticrm/ui'
|
|
|
|
export let label: IntlString
|
|
export let color: string
|
|
export let counter: number
|
|
</script>
|
|
|
|
<div class="panel-container" on:dragover on:drop>
|
|
<div class="header" style="background-color: {color}">
|
|
<div class="title"><Label {label} /></div>
|
|
<div class="counter">{counter}</div>
|
|
</div>
|
|
<div class="scroll">
|
|
<ScrollBox vertical>
|
|
<slot />
|
|
</ScrollBox>
|
|
</div>
|
|
</div>
|
|
|
|
<style lang="scss">
|
|
.panel-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
width: 20rem;
|
|
height: 100%;
|
|
background-color: var(--theme-button-bg-enabled);
|
|
border: 1px solid var(--theme-bg-accent-color);
|
|
border-radius: .75rem;
|
|
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin: .75rem;
|
|
padding: .5rem;
|
|
min-height: 2.75rem;
|
|
font-weight: 500;
|
|
border: 1px solid rgba(0, 0, 0, .1);
|
|
border-radius: .5rem;
|
|
|
|
.title {
|
|
padding-left: .5rem;
|
|
color: var(--theme-caption-color);
|
|
}
|
|
.counter {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 1.75rem;
|
|
height: 1.75rem;
|
|
color: var(--theme-contnet-accent-color);
|
|
background-color: rgba(0, 0, 0, .08);
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
|
|
.scroll {
|
|
margin: .5rem .75rem .75rem;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
:global(.panel-container + .panel-container) { margin-left: .75rem; }
|
|
</style>
|