Skip to content

Commit

Permalink
chore: revert example changes
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Aug 12, 2022
1 parent 18cd04c commit dfa3519
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/with-mdx/src/components/Counter.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'preact/hooks';

export function Counter({ children }) {
export default function Counter({ children }) {
const [count, setCount] = useState(0);
const add = () => setCount((i) => i + 1);
const subtract = () => setCount((i) => i - 1);
Expand Down
7 changes: 2 additions & 5 deletions examples/with-mdx/src/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as c from '../components/Counter';
import Counter from '../components/Counter.jsx';
import Title from '../components/Title.astro';
export const components = { h1: Title };

Expand All @@ -14,10 +14,7 @@ Written by: {new Intl.ListFormat('en').format(authors.map(d => d.name))}.

Published on: {new Intl.DateTimeFormat('en', {dateStyle: 'long'}).format(published)}.


export const value = () => console.log(c);

<c.Counter client:idle>This is a **counter**!</c.Counter>
<Counter client:idle>This is a **counter**!</Counter>

## Syntax highlighting

Expand Down

0 comments on commit dfa3519

Please sign in to comment.