mirror of
https://github.com/ershisan99/flashcards-docs.git
synced 2026-01-31 12:34:52 +00:00
initial commit, lesson 1
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
.counter {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
padding: 2px 6px;
|
||||
margin: 12px 0 0;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
// Example from https://beta.reactjs.org/learn
|
||||
|
||||
import { useState } from 'react'
|
||||
import styles from './counters.module.css'
|
||||
|
||||
function MyButton() {
|
||||
const [count, setCount] = useState(0)
|
||||
|
||||
function handleClick() {
|
||||
setCount(count + 1)
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<button onClick={handleClick} className={styles.counter}>
|
||||
Clicked {count} times
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default function MyApp() {
|
||||
return <MyButton />
|
||||
}
|
||||
10
components/download-link/index.tsx
Normal file
10
components/download-link/index.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
export const DownloadLink = ({ href }: { href: string }) => {
|
||||
return (
|
||||
<p style={{ marginTop: 24 }}>
|
||||
<a id="raw-url" download href={href} style={{ fontWeight: 700, color: 'blue' }}>
|
||||
Скачайте файл watchers.xml
|
||||
</a>{' '}
|
||||
и импортируйте его в Settings | Tools | File Watchers
|
||||
</p>
|
||||
)
|
||||
}
|
||||
1
components/index.ts
Normal file
1
components/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './download-link'
|
||||
Reference in New Issue
Block a user