chore: better Prettier config for easier reviews
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import { useMemo } from 'react'
|
||||
import Image from 'next/image'
|
||||
import classNames from 'clsx'
|
||||
import { useMemo } from "react"
|
||||
import Image from "next/image"
|
||||
import classNames from "clsx"
|
||||
|
||||
import type { ProviderOAuth } from '../../../models/OAuth'
|
||||
import styles from './SocialMediaButton.module.css'
|
||||
import type { ProviderOAuth } from "../../../models/OAuth"
|
||||
import styles from "./SocialMediaButton.module.css"
|
||||
|
||||
export type SocialMedia = ProviderOAuth
|
||||
|
||||
@ -12,13 +12,13 @@ type SocialMediaColors = {
|
||||
}
|
||||
|
||||
const socialMediaColors: SocialMediaColors = {
|
||||
Discord: '#404EED',
|
||||
GitHub: '#24292E',
|
||||
Google: '#FCFCFC'
|
||||
Discord: "#404EED",
|
||||
GitHub: "#24292E",
|
||||
Google: "#FCFCFC",
|
||||
}
|
||||
|
||||
const className =
|
||||
'py-2 px-6 inline-flex outline-none items-center font-paragraph rounded-lg cursor-pointer transition duration-300 ease-in-out hover:opacity-80 focus:outline-none'
|
||||
"py-2 px-6 inline-flex outline-none items-center font-paragraph rounded-lg cursor-pointer transition duration-300 ease-in-out hover:opacity-80 focus:outline-none"
|
||||
|
||||
interface SocialMediaChildrenProps {
|
||||
socialMedia: SocialMedia
|
||||
@ -36,13 +36,13 @@ const SocialMediaChildren: React.FC<SocialMediaChildrenProps> = (props) => {
|
||||
src={`/images/svg/web/${socialMedia}.svg`}
|
||||
alt={socialMedia}
|
||||
/>
|
||||
<span className='ml-2'>{socialMedia}</span>
|
||||
<span className="ml-2">{socialMedia}</span>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export interface SocialMediaButtonProps
|
||||
extends React.ComponentPropsWithRef<'button'>,
|
||||
extends React.ComponentPropsWithRef<"button">,
|
||||
SocialMediaChildrenProps {}
|
||||
|
||||
export const SocialMediaButton: React.FC<SocialMediaButtonProps> = (props) => {
|
||||
@ -58,12 +58,12 @@ export const SocialMediaButton: React.FC<SocialMediaButtonProps> = (props) => {
|
||||
style={{ background: socialMediaColor }}
|
||||
className={classNames(
|
||||
className,
|
||||
styles['button'],
|
||||
styles["button"],
|
||||
{
|
||||
[styles['buttonGoogle'] as string]: socialMedia === 'Google',
|
||||
[styles['buttonMedia'] as string]: socialMedia !== 'Google'
|
||||
[styles["buttonGoogle"] as string]: socialMedia === "Google",
|
||||
[styles["buttonMedia"] as string]: socialMedia !== "Google",
|
||||
},
|
||||
givenClassName
|
||||
givenClassName,
|
||||
)}
|
||||
>
|
||||
<SocialMediaChildren socialMedia={socialMedia} />
|
||||
@ -72,7 +72,7 @@ export const SocialMediaButton: React.FC<SocialMediaButtonProps> = (props) => {
|
||||
}
|
||||
|
||||
export interface SocialMediaLinkProps
|
||||
extends React.ComponentPropsWithRef<'a'>,
|
||||
extends React.ComponentPropsWithRef<"a">,
|
||||
SocialMediaChildrenProps {}
|
||||
|
||||
export const SocialMediaLink: React.FC<SocialMediaLinkProps> = (props) => {
|
||||
@ -88,12 +88,12 @@ export const SocialMediaLink: React.FC<SocialMediaLinkProps> = (props) => {
|
||||
style={{ background: socialMediaColor }}
|
||||
className={classNames(
|
||||
className,
|
||||
styles['button'],
|
||||
styles["button"],
|
||||
{
|
||||
[styles['buttonGoogle'] as string]: socialMedia === 'Google',
|
||||
[styles['buttonMedia'] as string]: socialMedia !== 'Google'
|
||||
[styles["buttonGoogle"] as string]: socialMedia === "Google",
|
||||
[styles["buttonMedia"] as string]: socialMedia !== "Google",
|
||||
},
|
||||
givenClassName
|
||||
givenClassName,
|
||||
)}
|
||||
>
|
||||
<SocialMediaChildren socialMedia={socialMedia} />
|
||||
|
@ -1 +1 @@
|
||||
export * from './SocialMediaButton'
|
||||
export * from "./SocialMediaButton"
|
||||
|
Reference in New Issue
Block a user