redacted button

This commit is contained in:
mosha_py 2020-11-27 22:32:44 +05:00
parent 69476ba8ba
commit 366585d40f
4 changed files with 5387 additions and 4 deletions

View File

@ -1,9 +1,11 @@
import React from "react";
import React from 'react';
import { useCounter } from "hooks/counter"
import styles from "styles/exampleComponent.module.css";
const ExampleComponent = () => {
return <button className={styles.button}>Amazing button!</button>;
const {} = useCounter()
return <button className={styles.button}>Amazing button by Timothy!</button>;
};
export default ExampleComponent;

View File

@ -2,7 +2,7 @@ import { useState } from "react";
// Если функционал можно где-то переиспользовать или если код логики компонента занимает больше 150 строк, стоит разбить его на кастомные хуки и вынести сюда
/**
* Simple counter hook
* Simple hook
* @param {number} initialState
*/
const useCounter = (initialState = 0) => {

5381
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,5 +2,5 @@
в разных компонентах и ничего нам за это не будет, ибо при сборке к ним добавятся хеши */
.button {
background-color: red;
color: white;
color: rgb(255, 255, 255);
}