Reaction Button Styling
This commit is contained in:
parent
11cba5caf0
commit
1bdc48f5c9
3 changed files with 30 additions and 19 deletions
|
|
@ -24,7 +24,7 @@ export default function Reaction({ slug }: { slug: string }) {
|
|||
})
|
||||
|
||||
setReaction(prev => ({ ...prev, browser_id: browserId }))
|
||||
}, [])
|
||||
}, [])
|
||||
|
||||
const handleReaction = () => {
|
||||
let hasError = false
|
||||
|
|
@ -51,8 +51,17 @@ export default function Reaction({ slug }: { slug: string }) {
|
|||
|
||||
|
||||
return (
|
||||
<button onClick={handleReaction}>
|
||||
{haveReacted ? "♥" : "🧭"} {reactionCount}
|
||||
<button onClick={handleReaction}
|
||||
|
||||
style="
|
||||
font-size: 1rem;
|
||||
width: 100%;
|
||||
padding:8px;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
">
|
||||
|
||||
|
||||
{haveReacted ? "♥ Yeah!" : "Hattest du Spaß beim Lesen?"} {reactionCount}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
|
@ -30,12 +30,14 @@ const localeDate = formatLocalizedDateString(postData.date);
|
|||
<h3 id="subtitle">{postData.subtitle}</h3>
|
||||
<span id="introduction">{postData.introduction}</span>
|
||||
</div>
|
||||
<Reaction slug={postData.slug} client:load />
|
||||
<div id="hr-knast">
|
||||
<hr />
|
||||
</div>
|
||||
<article class="markdown-content">
|
||||
<slot />
|
||||
<div id="react">
|
||||
<Reaction slug={postData.slug} client:load />
|
||||
</div>
|
||||
<NavBack client:load />
|
||||
<p class="disclaimer">
|
||||
Disclaimer: Dieser Artikel ist ausschließlich privat und wird nicht
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ body {
|
|||
font-weight: bolder;
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
padding: 12px 12px 12px 0;
|
||||
padding: 48px 12px 12px 0;
|
||||
}
|
||||
|
||||
.back-btn:hover {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue