generated from sweetmantech/DACIRKUS_PERFORMERS
-
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.
Merge pull request #20 from SweetmanTech/test
Test
- Loading branch information
Showing
15 changed files
with
346 additions
and
112 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,94 @@ | ||
/* eslint-disable */ | ||
import { Icons } from "./resolver" | ||
|
||
export type IconsType = keyof typeof Icons | ||
|
||
interface IIcon { | ||
name: IconsType | ||
color?: string | ||
variant: "primary" | "secondary" | ||
size: number | ||
onClick: () => any | ||
raw: boolean | ||
noHighlights: boolean | ||
disabled: boolean | ||
className?: string | ||
} | ||
|
||
const styles = { | ||
base: "w-fit h-fit flex items-center justify-center rounded shadow-sm", | ||
sizes: { | ||
mini: "p-[2px]", | ||
small: "p-1", | ||
medium: "p-3", | ||
large: "p-4", | ||
}, | ||
variants: { | ||
primary: { | ||
color: "text-gray-500 bg-white", | ||
highlight: "duration-75 hover:bg-[rgba(0,0,0,0.01)]", | ||
}, | ||
secondary: { | ||
color: "text-here-purple-900 bg-here-purple-50", | ||
highlight: "duration-75 hover:opacity-75", | ||
}, | ||
}, | ||
states: { | ||
disabled: "cursor-not-allowed pointer-events-none", | ||
}, | ||
} | ||
|
||
function Icon({ | ||
name, | ||
size, | ||
onClick, | ||
raw, | ||
color, | ||
variant, | ||
noHighlights, | ||
disabled, | ||
className, | ||
}: IIcon) { | ||
const IconSVG = Icons[name] | ||
|
||
return raw ? ( | ||
<IconSVG size={size} className={className} color={color} /> | ||
) : ( | ||
<button | ||
type="button" | ||
disabled={disabled} | ||
onClick={!disabled ? onClick : () => {}} | ||
className={` | ||
${styles.base} | ||
${styles?.variants?.[variant]?.color} | ||
${disabled && styles.states.disabled} | ||
${ | ||
size <= 20 | ||
? styles.sizes.mini | ||
: size < 25 | ||
? styles.sizes.small | ||
: size < 40 | ||
? styles.sizes.medium | ||
: styles.sizes.large | ||
} | ||
${!noHighlights && styles?.variants?.[variant]?.highlight} | ||
${className} | ||
`} | ||
> | ||
<IconSVG size={size} /> | ||
</button> | ||
) | ||
} | ||
|
||
const defaultProps: Partial<IIcon> = { | ||
size: 25, | ||
onClick: () => undefined, | ||
raw: false, | ||
noHighlights: false, | ||
variant: "primary", | ||
disabled: false, | ||
} | ||
|
||
Icon.defaultProps = defaultProps | ||
|
||
export default Icon |
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 { IoWifi } from "react-icons/io5" | ||
import { SiTidal } from "react-icons/si" | ||
import { FaSpotify, FaApple, FaYoutube, FaFacebookF, FaInstagram, FaTwitter } from "react-icons/fa" | ||
import { SlSocialSoundcloud } from "react-icons/sl" | ||
|
||
export const Icons = { | ||
wifi: IoWifi, | ||
spotify: FaSpotify, | ||
soundcloud: SlSocialSoundcloud, | ||
tidal: SiTidal, | ||
apple: FaApple, | ||
youtube: FaYoutube, | ||
facebook: FaFacebookF, | ||
instagram: FaInstagram, | ||
twitter: FaTwitter, | ||
} |
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,14 @@ | ||
import React from "react" | ||
import { ILayout } from "../types" | ||
import Navbar from "../../Navbar" | ||
|
||
const MobileLayout = ({ children }: ILayout) => ( | ||
<div className="w-screen h-screen p-[15px]"> | ||
<div className="flex flex-col gap-y-[15px]"> | ||
<Navbar /> | ||
<div className="flex-grow h-[calc(100vh-70px)]">{children}</div> | ||
</div> | ||
</div> | ||
) | ||
|
||
export default MobileLayout |
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 @@ | ||
import MobileLayout from "./MobileLayout" | ||
|
||
export default MobileLayout |
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.