redacted button
This commit is contained in:
parent
69476ba8ba
commit
366585d40f
@ -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;
|
||||
|
@ -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
5381
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,5 +2,5 @@
|
||||
в разных компонентах и ничего нам за это не будет, ибо при сборке к ним добавятся хеши */
|
||||
.button {
|
||||
background-color: red;
|
||||
color: white;
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user