style: divider component (#255)

This commit is contained in:
Barbara Gomes 2023-03-14 17:01:30 -04:00 committed by GitHub
parent 0394752b21
commit 311f7e5423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 28 deletions

View File

@ -0,0 +1,29 @@
<script lang="ts">
export let visible: 'always' | 'desktop' | 'mobile' = 'always'
</script>
<hr class={visible} />
<style lang="scss">
hr {
border: none;
width: 100%;
height: 1px;
background-color: var(--grey-200);
&.desktop {
@media (max-width: 687.98px) {
display: none;
}
}
&.mobile {
@media (min-width: 688px) {
display: none;
}
}
// @media (prefers-color-scheme: dark) {
// background-color: var(--grey-500);
// }
}
</style>

View File

@ -1,4 +1,5 @@
<script lang="ts">
import Divider from '$lib/components/divider.svelte'
let cls: string | undefined = undefined
export { cls as class }
</script>
@ -8,7 +9,7 @@
<div class="card">
<slot />
</div>
<hr />
<Divider visible="mobile" />
</div>
<style lang="scss">
@ -20,12 +21,6 @@
align-items: flex-end;
justify-content: flex-end;
hr {
@media (min-width: 688px) {
display: none;
}
}
&:hover {
background-color: var(--grey-150);
}

View File

@ -1,9 +1,10 @@
<script lang="ts">
export let title: string
import Divider from '$lib/components/divider.svelte'
</script>
<div class="root">
<hr />
<Divider visible="desktop" />
<div class="wrapper">
<div class="row">
<div class="title">{title}</div>
@ -14,16 +15,10 @@
<slot />
</div>
<hr />
<Divider visible="mobile" />
</div>
<style lang="scss">
hr:last-child {
@media (min-width: 688px) {
display: none;
}
}
.wrapper {
padding: var(--spacing-24);
transition: padding 0.2s;

View File

@ -1,5 +1,6 @@
<script lang="ts">
import HeaderTop from '$lib/components/header-top.svelte'
import Divider from '$lib/components/divider.svelte'
import { profile } from '$lib/stores/profile'
import { chats } from '$lib/stores/chat'
@ -13,7 +14,6 @@
<div>
<HeaderTop address={$profile.address} />
<div class="wrapper">
{#if $profile.signer !== undefined}
<!-- svelte-ignore a11y-click-events-have-key-events -->
@ -29,6 +29,7 @@
</nav>
</div>
{/if}
<Divider visible="mobile" />
<slot />
</div>

View File

@ -19,6 +19,7 @@
import Grid from '$lib/components/grid.svelte'
import Container from '$lib/components/container.svelte'
import InfoBox from '$lib/components/info-box.svelte'
import Divider from '$lib/components/divider.svelte'
import { personas } from '$lib/stores/persona'
import { tokens } from '$lib/stores/tokens'
@ -106,7 +107,7 @@
icon={EditPersona}
on:click={() => (state = 'text')}
/>
<hr />
<Divider />
<Container>
<InfoBox>
{#if persona.posts.length < PERSONA_LIMIT}

View File

@ -129,13 +129,6 @@ video {
border-style: none;
}
hr {
border: none;
width: 100%;
height: 1px;
background-color: var(--grey-200);
}
a {
color: var(--color-black);
text-decoration: underline;
@ -166,8 +159,4 @@ a {
background-color: var(--color-body-bg);
color: var(--color-body-text);
}
hr {
background-color: var(--grey-500);
}
} */