File tree Expand file tree Collapse file tree 6 files changed +65
-12
lines changed
Expand file tree Collapse file tree 6 files changed +65
-12
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,11 @@ import { Open_Sans } from 'next/font/google';
44import type { AppProps } from 'next/app' ;
55import Head from "next/head" ;
66
7- import '@/styles/main.css' ;
87import Header from "@/components/navigation/Header" ;
98import Footer from "@/components/navigation/Footer" ;
109
10+ import '@/styles/main.css' ;
11+
1112const openSans = Open_Sans ( {
1213 subsets : [ 'latin' ] ,
1314 variable : "--font-open-sans"
Original file line number Diff line number Diff line change 1010}
1111
1212html {
13- @apply bg-fill text-fill-contrast
13+ @apply bg-fill text-fill-contrast;
14+ }
15+
16+ div .swal2-popup .swal2-toast {
17+ @apply p-3 shadow shadow-black/25 bg-white/50 backdrop-blur-sm;
18+ }
19+
20+ div .swal2-popup .swal2-toast .swal2-title {
21+ @apply m-0 text-black;
22+ }
23+
24+ div .swal2-popup .swal2-toast .swal2-html-container {
25+ @apply m-0 text-black;
26+ }
27+
28+ div .swal2-popup .swal2-toast .swal2-icon {
29+ @apply mr-4;
1430}
Original file line number Diff line number Diff line change 11import Swal from "sweetalert2" ;
22import withReactContent from "sweetalert2-react-content" ;
3+ const swal = withReactContent ( Swal ) . mixin ( {
4+ customClass : {
5+ icon : "mr-4"
6+ }
7+ } ) ;
38
4- const swal = withReactContent ( Swal ) ;
9+ export const toast = swal . mixin ( {
10+ timer : 5000 ,
11+ timerProgressBar : true ,
12+ position : "top" ,
13+ showConfirmButton : false ,
14+ toast : true ,
15+ didOpen : ( toast ) => {
16+ toast . addEventListener ( 'mouseenter' , Swal . stopTimer ) ;
17+ toast . addEventListener ( 'mouseleave' , Swal . resumeTimer ) ;
18+ } ,
19+ customClass : {
20+
21+ }
22+ } ) ;
523
624export default swal ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import wretch from "wretch" ;
2+ import { toast } from "./swal" ;
3+
4+ export const backend = wretch ( process . env . NEXT_PUBLIC_BACKEND_URL ! )
5+ . options ( {
6+ mode : "cors"
7+ } )
8+ . catcher ( 404 , ( ) => toast . fire ( {
9+ title : "Error" ,
10+ icon : "error" ,
11+ text : "Resource was not found."
12+ } ) )
13+ . catcher ( 500 , ( ) => toast . fire ( {
14+ title : "Error" ,
15+ icon : "error" ,
16+ text : "Internal Server Error, try again later."
17+ } ) ) ;
Original file line number Diff line number Diff line change 1+ const plugin = require ( "tailwindcss/plugin" ) ;
12const { fontFamily } = require ( 'tailwindcss/defaultTheme' ) ;
23
3-
44/** @type {import('tailwindcss').Config } */
55module . exports = {
66 content : [
77 "./src/pages/**/*.tsx" ,
88 "./src/components/**/*.tsx" ,
9+ "./src/utils/**/*.{ts,tsx}"
910 ] ,
1011 theme : {
1112 extend : {
@@ -14,7 +15,7 @@ module.exports = {
1415 } ,
1516 colors : {
1617 primary : {
17- DEFAULT : "#FF5C00 " ,
18+ DEFAULT : "#f2600c " ,
1819 light : "#FF792E" ,
1920 dark : "#DB5103" ,
2021 contrast : "#FFF"
@@ -26,7 +27,7 @@ module.exports = {
2627 contrast : "#FFF"
2728 } ,
2829 fill : {
29- DEFAULT : "#FFDFC1 " ,
30+ DEFAULT : "#FFE4CC " ,
3031 contrast : "#282828"
3132 }
3233 } ,
@@ -35,5 +36,10 @@ module.exports = {
3536 }
3637 } ,
3738 } ,
38- plugins : [ ] ,
39+ plugins : [
40+ plugin ( ( { addVariant } ) => {
41+ addVariant ( "is" , ":is(&)" ) ;
42+ addVariant ( "where" , ":where(&)" ) ;
43+ } )
44+ ] ,
3945} ;
You can’t perform that action at this time.
0 commit comments