Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle graphs in the training board olena #825

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions webapp/src/components/containers/DropdownCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,37 @@
</template>
</IconCardHeader>

<div v-show="opened" class="text-sm text-slate-500 dark:text-slate-300 p-8 border-t">
<div
v-show="opened"
class="text-sm text-slate-500 dark:text-slate-300 p-8 border-t"
>
<slot />
</div>
</div>
</div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { ref, watch } from "vue";

import UpArrow from "@/assets/svg/UpArrow.vue";
import DownArrow from "@/assets/svg/DownArrow.vue";

import IconCardHeader from "./IconCardHeader.vue";

const props = withDefaults(
defineProps<{
initiallyOpen?: boolean;
}>(),
{ initiallyOpen: true },
);

const opened = ref(true);

watch(props, ({ initiallyOpen }) => {
opened.value = initiallyOpen;
});

function toggle() {
opened.value = !opened.value;
}
Expand Down
Loading