diff --git a/04_Day_Components/04_components_boilerplate/src/App.js b/04_Day_Components/04_components_boilerplate/src/App.js new file mode 100644 index 0000000..d1e6cda --- /dev/null +++ b/04_Day_Components/04_components_boilerplate/src/App.js @@ -0,0 +1,97 @@ +import React from "react"; +import imageAsa from './images/asabeneh.jpg' + +const buttonStyle = { + width : 200, + padding: '0.5rem 1rem', + backgroundColor: 'crimson', + color: 'white', + border: 'none', + borderRadius: 4 +} + +const inputStyle = { + border: 'none', + padding: '0.5rem 1rem', + backgroundColor: '#a4a4a4', + borderRadius: 4 +} + +const inputContainer = { + display: 'flex', + justifyContent: 'center', + gap: 13, + padding: '1rem' +} + +const container = { + textAlign: 'center' +} + +const skillStyle = { + padding: '0.5rem', + backgroundColor: 'purple', + color: 'white', + margin: '0.5rem', + borderRadius: 4 +} + +const user = { + name: 'Asabenah Yetayeh', + title: 'Senior Developer,Finland', + skills : ['HTML', 'Css', 'Sass', 'Scss', 'Js', 'React', 'Redux'] +} + +const hexaColor = () => { + let str = '0123456789abcdef' + let color = '' + for (let i = 0; i < 6; i++) { + let index = Math.floor(Math.random() * str.length) + color += str[index] + } + return '#' + color +} + +const ReUsableButton = props => ; +const ReUsableInput = props => ; +const ColorfulBox = props =>
{ props.color }
+ +const Exercise1 = () => ( +
+

Subscribe

+

Sign bilmem ne ol sonra dön götüne koy.

+
+ + + +
+ +
+) + +const Exercise3 = () => { + return( +
+ {'asa'}/ +

{user.name}

+

{user.title}

+
+ { + user.skills.map( skill => {skill} ) + } +
+
+ ) +} + +// The App, or the parent or the container component +export const App = () => ( +
+ + + + + + +
+) \ No newline at end of file diff --git a/04_Day_Components/04_components_boilerplate/src/index.js b/04_Day_Components/04_components_boilerplate/src/index.js index 533e142..42a0f37 100644 --- a/04_Day_Components/04_components_boilerplate/src/index.js +++ b/04_Day_Components/04_components_boilerplate/src/index.js @@ -2,6 +2,7 @@ import React from 'react' import ReactDOM from 'react-dom' import asabenehImage from './images/asabeneh.jpg' +import { App } from './App'; const hexaColor = () => { let str = '0123456789abcdef' @@ -97,13 +98,13 @@ const Footer = () => ( ) // The App, or the parent or the container component -const App = () => ( +/*const App = () => (
-) +)*/ const rootElement = document.getElementById('root') // we render the App component using the ReactDOM package