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

NeoTable and NeoModal to tailwindcss #8473

Merged
merged 3 commits into from
Dec 8, 2023
Merged
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
50 changes: 17 additions & 33 deletions libs/ui/src/components/NeoModal/NeoModal.scss
Original file line number Diff line number Diff line change
@@ -1,62 +1,46 @@
@import '../../scss/variable.scss';
@import '../../scss/animation.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/_expressions.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/_variables.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/_animations.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/_helpers.scss';

$modal-content-border-radius: 0;
$modal-overlay-background-color: rgb(0 0 0 / 0.17);

@import '@oruga-ui/oruga-next/src/scss/components/_modal.scss';


.neo-modal {

.o-modal__content {
width: auto !important;
max-height: var(--max-height);
@include ktheme() {
box-shadow: theme('primary-shadow');
border: 1px solid theme('border-color');
color: theme('text-color');
background: theme('background-color');
}
@apply w-auto max-h-[var(--max-height)] shadow-primary border-default border-border-color text-text-color bg-background-color;

&.no-shadow {
box-shadow: none;
@apply shadow-none;
}

&.enable-mobile {
@media screen and (max-width: 425px) {
.modal-width, &.modal-width {
width: unset;
@media screen and (max-width: 425px) {
@apply absolute -bottom-[1px] -right-[1px] -left-[1px] flex flex-col;

.modal-width,
&.modal-width {
@apply w-[unset];
}
position: absolute;
bottom: -1px;
right: -1px;
left: -1px;
display: flex;
flex-direction: column;
}

}
}

.o-modal__content--full-screen {
width: 100%!important;
max-height: 100vh !important;
}

.o-modal__overlay {
background-color: rgba(0, 0, 0, 0.17);
@apply w-full h-screen;
}

.modal-card-head {
background: unset;
@apply bg-[unset];
}

.card {
border-radius: 0;
@apply rounded-none;
}
&.append-to-body{
z-index: 999;

&.append-to-body {
@apply z-[999];
}
}
4 changes: 2 additions & 2 deletions libs/ui/src/components/NeoModal/NeoModal.story.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<Story title="NeoNftCard">
<Variant title="Nft Card">
<Story title="NeoModal">
<Variant title="Modal">
<NeoModal :value="modalActive" @close="modalActive = false">
Modal Content
</NeoModal>
Expand Down
49 changes: 12 additions & 37 deletions libs/ui/src/components/NeoTable/NeoTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default {
</script>

<style lang="scss">
@import '../../scss/_theme.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/_expressions.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/_variables.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/_animations.scss';
Expand All @@ -25,75 +24,51 @@ $table-td-border: 0;
$table-th-border: 0;
$table-th-font-weight: 400;

@import '@oruga-ui/oruga-next/src/scss/components/_table.scss';

.o-table {
@include ktheme() {
color: theme('text-color');
background-color: theme('background-color');
}
@apply text-text-color bg-background-color;

&__root {
overflow-x: auto;
@apply overflow-x-auto;
}

&__th {
font-size: 12px;
@include ktheme() {
color: theme('k-grey');
background-color: theme('background-color');
}
@apply text-xs text-k-grey bg-background-color;
}

&__detail {
@include ktheme() {
color: theme('text-color');
background-color: theme('background-color');
}
@apply text-text-color bg-background-color;
}

@media (max-width: 1024px) {
tbody tr {
padding-top: 1.5rem;
@include ktheme() {
background-color: theme('background-color') !important;
}
@apply pt-6 bg-background-color;
}

&__td {
&::before {
font-size: 0.75rem;
line-height: 1.5rem;
@include ktheme() {
color: theme('k-grey');
}
@apply text-xs/4.5 text-k-grey;
}

margin: 0 1.5rem;
padding: 0.25rem 0;
@apply my-0 mx-6 py-1 px-0;

&:last-child {
@include ktheme() {
border-bottom: 1px solid theme('k-shade') !important;
}
@apply border-b-default border-b-k-shade;
}
}

&--hoverable {
tbody tr:hover td {
@include ktheme() {
background-color: theme('background-color') !important;
}
@apply bg-background-color;
}
}
}

&--hoverable {
tbody tr:hover td {
@include ktheme() {
background-color: theme('k-accentlight2');
}
@apply bg-k-accent-light-2;
}
}
}

@import '@oruga-ui/oruga-next/src/scss/components/_table.scss';
</style>