forked from b00tc4mp/isdi-bootcamp-202405
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dark mode, alert, confirm components b00tc4mp#68
- Loading branch information
1 parent
d5d7fe1
commit 677b4ba
Showing
30 changed files
with
472 additions
and
398 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hash": "5703c339", | ||
"configHash": "22b1cf26", | ||
"lockfileHash": "e3b0c442", | ||
"browserHash": "90f4ce25", | ||
"optimized": {}, | ||
"chunks": {} | ||
} |
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,3 @@ | ||
{ | ||
"type": "module" | ||
} |
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
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ export default { | |
}, | ||
}, | ||
plugins: [], | ||
darkMode: 'selector' | ||
} | ||
|
||
|
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
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,17 @@ | ||
import Button from '../library/Button' | ||
import Paragraph from '../library/Paragraph' | ||
import Container from '../library/Container' | ||
|
||
export default function Alert({ message, onAccept }) { | ||
return <> | ||
<Container className="fixed w-screen top-0 h-screen bg-black opacity-50"> | ||
</Container> | ||
|
||
<Container className="fixed w-screen top-0 h-screen flex items-center justify-center"> | ||
<Container className="p-4 border bg-white dark:bg-black dark:text-white flex-col"> | ||
<Paragraph>{message}</Paragraph> | ||
<Button onClick={onAccept}>Accept</Button> | ||
</Container> | ||
</Container> | ||
</> | ||
} |
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,18 @@ | ||
import Button from '../library/Button' | ||
import Paragraph from '../library/Paragraph' | ||
import Container from '../library/Container' | ||
|
||
export default function Confirm({ message, onAccept, onCancel }) { | ||
return <> | ||
<Container className="fixed w-screen top-0 h-screen bg-black opacity-50"> | ||
</Container> | ||
|
||
<Container className="fixed w-screen top-0 h-screen flex items-center justify-center"> | ||
<Container className="p-4 border bg-white dark:bg-black dark:text-white flex-col"> | ||
<Paragraph>{message}</Paragraph> | ||
<Button onClick={onCancel}>Cancel</Button> | ||
<Button onClick={onAccept}>Ok</Button> | ||
</Container> | ||
</Container> | ||
</> | ||
} |
7 changes: 0 additions & 7 deletions
7
staff/nerina-castillo/ponies/app/view/components/Paragraph.jsx
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
import { useContext as useReactContext, createContext } from "react" | ||
|
||
export const Context = createContext() | ||
|
||
export default function useContext() { return useReactContext(Context) } |
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
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
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
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
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
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
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
Oops, something went wrong.