From 8f57b82f6e9e4d010cf2282c54c7f59d4ba542d8 Mon Sep 17 00:00:00 2001 From: Eduardolans Date: Thu, 25 Jul 2024 19:00:06 +0200 Subject: [PATCH] create new classNames in Home & Post in App; delte direction and align props ; add/modify custom CSS classes using Tailwind in css index; #136 --- .../app/src/components/library/View.jsx | 12 ++++- .../socialcode/app/src/index.css | 49 ++++++++++--------- .../socialcode/app/src/views/Home.jsx | 6 +-- .../app/src/views/components/Post.jsx | 12 ++--- 4 files changed, 45 insertions(+), 34 deletions(-) diff --git a/staff/eduardo-sanchez/socialcode/app/src/components/library/View.jsx b/staff/eduardo-sanchez/socialcode/app/src/components/library/View.jsx index bb8b4d948..591241047 100644 --- a/staff/eduardo-sanchez/socialcode/app/src/components/library/View.jsx +++ b/staff/eduardo-sanchez/socialcode/app/src/components/library/View.jsx @@ -1,6 +1,6 @@ -function View({ tag: Tag = 'div', className, children, direction = 'column', align = 'center' }) { +function View({ tag: Tag = 'div', className, children }) { - return {children} + return {children} } export default View @@ -24,3 +24,11 @@ export default View // } // export default View; + + +// function View({ tag: Tag = 'div', className, children, direction = 'column', align = 'center' }) { + +// return {children} +// } + +// export default View \ No newline at end of file diff --git a/staff/eduardo-sanchez/socialcode/app/src/index.css b/staff/eduardo-sanchez/socialcode/app/src/index.css index 4304d7d4d..3cfeea4af 100644 --- a/staff/eduardo-sanchez/socialcode/app/src/index.css +++ b/staff/eduardo-sanchez/socialcode/app/src/index.css @@ -46,7 +46,11 @@ } .Image { - @apply w-full; + @apply min-w-fit; + } + + .Image-Container { + @apply flex justify-center w-4/5; } .SubmitButton { @@ -75,35 +79,14 @@ @apply text-green-500; } - /* .View { - @apply flex flex-col items-center; - } */ - .View { @apply flex gap-[1rem]; } - .View.column { - @apply flex-col; - } - - .View.row { - @apply flex-row gap-[1rem]; - } - - .View.center { - @apply items-center; - } - .View h2 { @apply text-[blue] } - /* - .View button { - @apply flex justify-center; - } */ - .CreatePostForm { @apply fixed bottom-[3rem] w-full left-0 box-border bg-[var(--second-color)]; } @@ -117,7 +100,27 @@ } .PostList { - @apply m-[60px_10px]; + @apply flex flex-col justify-center items-center m-20 w-4/6; + } + + .Post { + @apply flex flex-col w-[22rem] justify-start items-center; + } + + .Post-Header { + @apply flex w-[100%] justify-between; + } + + .Post-Description { + @apply flex w-full justify-start; + } + + .Main { + @apply flex flex-col justify-center items-center; + } + + .Date { + @apply flex justify-between w-full; } diff --git a/staff/eduardo-sanchez/socialcode/app/src/views/Home.jsx b/staff/eduardo-sanchez/socialcode/app/src/views/Home.jsx index 3f8534dce..e88aef1ce 100644 --- a/staff/eduardo-sanchez/socialcode/app/src/views/Home.jsx +++ b/staff/eduardo-sanchez/socialcode/app/src/views/Home.jsx @@ -58,20 +58,20 @@ function Home({ onUserLoggedOut }) { setView('') } - return + return <>
{name}
- + {view === 'create-post' && }