Add subscribed mode to subscribing topic button
This commit is contained in:
parent
c9666e63f9
commit
7e256b3ed4
3
public/icons/check-subscribed.svg
Normal file
3
public/icons/check-subscribed.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="13" height="10" viewBox="0 0 13 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M1 4.5L4.66667 8L12 1" stroke="white" stroke-width="1.5"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 171 B |
|
@ -120,3 +120,7 @@
|
||||||
.isSubscribing {
|
.isSubscribing {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.isSubscribed {
|
||||||
|
background: #000;
|
||||||
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { clsx } from 'clsx'
|
||||||
import { useSession } from '../../context/session'
|
import { useSession } from '../../context/session'
|
||||||
import { StatMetrics } from '../_shared/StatMetrics'
|
import { StatMetrics } from '../_shared/StatMetrics'
|
||||||
import { ShowOnlyOnClient } from '../_shared/ShowOnlyOnClient'
|
import { ShowOnlyOnClient } from '../_shared/ShowOnlyOnClient'
|
||||||
|
import { Icon } from '../_shared/Icon'
|
||||||
|
|
||||||
const log = getLogger('TopicCard')
|
const log = getLogger('TopicCard')
|
||||||
|
|
||||||
|
@ -96,13 +97,14 @@ export const TopicCard = (props: TopicProps) => {
|
||||||
class="button--light button--subscribe-topic"
|
class="button--light button--subscribe-topic"
|
||||||
classList={{
|
classList={{
|
||||||
[styles.buttonCompact]: props.compact,
|
[styles.buttonCompact]: props.compact,
|
||||||
[styles.isSubscribing]: isSubscribing()
|
[styles.isSubscribing]: isSubscribing(),
|
||||||
|
[styles.isSubscribed]: subscribed()
|
||||||
}}
|
}}
|
||||||
disabled={isSubscribing()}
|
disabled={isSubscribing()}
|
||||||
>
|
>
|
||||||
<Show when={props.iconButton}>
|
<Show when={props.iconButton}>
|
||||||
<Show when={subscribed()} fallback="+">
|
<Show when={subscribed()} fallback="+">
|
||||||
-
|
<Icon name="check-subscribed" />
|
||||||
</Show>
|
</Show>
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={!props.iconButton}>
|
<Show when={!props.iconButton}>
|
||||||
|
|
|
@ -243,6 +243,11 @@ button {
|
||||||
border: 2px solid #000;
|
border: 2px solid #000;
|
||||||
border-radius: 0.8rem;
|
border-radius: 0.8rem;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
font-size: 1.2em;
|
||||||
|
line-height: 2.8rem;
|
||||||
|
height: 3.2rem;
|
||||||
|
padding: 0;
|
||||||
|
width: 3.2rem;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: #000;
|
background: #000;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user