Skip to content

Commit

Permalink
docs: fix web component
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Dec 11, 2024
1 parent 963bd31 commit e4085dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/www/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ function CustomCounter(props, { state }) {
return (
<>
<div>Counter: {count.value}</div>
<button onClick={() => count.value++}>
Increment
</button>
<button onClick={() => count.value--}>
Decrement
</button>
<button onClick={() => count.value++}>
Increment
</button>
</>
);
}
Expand Down
14 changes: 7 additions & 7 deletions packages/www/src/web-components/custom-counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,32 @@ function CustomCounter(props: { start: number }, { state, css }: WebContext) {
padding: 80px 20px;
margin: 10px auto 50px auto;
}
p {
font-size: 22px;
font-weight: bold;
}
button{
padding:10px;
border:1px solid var(--color-primary);
margin:5px;
button {
padding: 10px;
border: 1px solid var(--color-primary);
margin: 5px;
background-color: var(--color-white);
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
button:hover {
background-color: var(--color-light-green);
}
`;

return (
<div>
<p>Counter: {count.value}</p>
<button onClick={() => count.value++}>Increment</button>
<button onClick={() => count.value--}>Decrement</button>
<button onClick={() => count.value++}>Increment</button>
</div>
);
}
Expand Down

0 comments on commit e4085dc

Please sign in to comment.