forked from b00tc4mp/isdi-parttime-202403
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add confirm & alert compos & integrate them in app (alert only in hom…
…e); b00tc4mp#136
- Loading branch information
1 parent
e214354
commit de476be
Showing
6 changed files
with
139 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
staff/eduardo-sanchez/socialcode/app/src/views/components/Alert/index.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@tailwind components; | ||
|
||
@layer components { | ||
/* .Alert { | ||
@apply p-[.4rem] bg-[red] text-[1rem] border-[1px] border-[var(--first-color)]; | ||
; | ||
} */ | ||
|
||
.Alert { | ||
@apply fixed top-20 left-0 w-full h-full flex justify-end; | ||
} | ||
|
||
.AlertBox { | ||
@apply p-[.4rem] bg-yellow-300 text-[1rem] border-[1px] border-red-500 w-[100px] h-[100px]; | ||
} | ||
|
||
/* | ||
.Alert { | ||
@apply fixed top-0 left-0 w-full h-full flex justify-center items-center; | ||
} | ||
.AlertBox { | ||
@apply p-[.4rem] bg-[var(--second-color)] text-[1rem] border-[1px] border-[var(--first-color)] w-[200px] h-[200px]; | ||
} | ||
.AlertBox--warn { | ||
@apply bg-yellow-300; | ||
} | ||
.AlertBox--error { | ||
@apply bg-red-500; | ||
} | ||
*/ | ||
|
||
|
||
} |
15 changes: 15 additions & 0 deletions
15
staff/eduardo-sanchez/socialcode/app/src/views/components/Alert/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import './index.css' | ||
|
||
export default ({ message, onAccept, level = 'warn' }) => <div className="Alert"> | ||
<div className={`AlertBox AlertBox-${level}`}> | ||
<p>{message}</p> | ||
<button className="Button" onClick={onAccept}>Accept</button> | ||
</div> | ||
</div> | ||
|
||
// export default ({ message, onAccept, level = 'warn' }) => <div class="Alert"> | ||
// <div class={`AlertBox AlertBox-${level}`}> | ||
// <p>{message}</p> | ||
// <button class="Button" onClick={onAccept}>Accept</button> | ||
// </div> | ||
// </div> |
15 changes: 15 additions & 0 deletions
15
staff/eduardo-sanchez/socialcode/app/src/views/components/Confirm/index.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@tailwind components; | ||
|
||
@layer components { | ||
/* .Confirm { | ||
@apply fixed top-0 left-0 w-full h-full flex justify-center items-center; | ||
} */ | ||
|
||
/* .ConfirmBox { | ||
@apply p-[.4rem] bg-[var(--second-color)] text-[1rem] border-[1px] border-[var(--first-color)] w-[200px] h-[200px]; | ||
} */ | ||
|
||
.Confirm { | ||
@apply p-[.4rem] bg-[var(--second-color)] text-[1rem] border-[1px] border-[var(--first-color)]; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
staff/eduardo-sanchez/socialcode/app/src/views/components/Confirm/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import './index.css' | ||
|
||
export default ({ message, onAccept, onCancel }) => <div className="Confirm"> | ||
<p>{message}</p> | ||
<button className="Button" onClick={onCancel} >Cancel</button> | ||
<button className="Button" onClick={onAccept} >Confirm</button> | ||
</div> | ||
|
||
|
||
// export default ({ message, onAccept, onCancel }) => <div class="Confirm"> | ||
// <div class="ConfirmBox"> | ||
// <p>{message}</p> | ||
// <button class="Button" onClick={onCancel}>Cancel</button> | ||
// <button class="Button" onClick={onAccept}>Confirm</button> | ||
// </div> | ||
// </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters