2023-11-02 23:46:07 +03:00
|
|
|
import React from 'react'
|
|
|
|
import './Pills.css'
|
|
|
|
import Link from '@docusaurus/Link'
|
2023-08-11 17:47:49 +03:00
|
|
|
|
|
|
|
export function Pill({ children, linkToPage, style = {} }) {
|
2023-11-02 23:46:07 +03:00
|
|
|
return (
|
|
|
|
<Link
|
|
|
|
to={linkToPage}
|
|
|
|
style={{
|
|
|
|
padding: '0.1rem 0.5rem',
|
|
|
|
borderRadius: '0.375rem',
|
|
|
|
color: 'var(--auth-pills-color)',
|
|
|
|
textDecoration: 'none',
|
|
|
|
display: 'inline-block',
|
|
|
|
...style,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</Link>
|
|
|
|
)
|
2023-08-11 17:47:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
:root {
|
|
|
|
--auth-pills-email: #e0f2fe;
|
|
|
|
--auth-pills-github: #f1f5f9;
|
|
|
|
--auth-pills-google: #ecfccb;
|
|
|
|
--auth-pills-username-and-pass: #fce7f3;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
export function EmailPill() {
|
2023-11-02 23:46:07 +03:00
|
|
|
return (
|
|
|
|
<Pill
|
|
|
|
style={{
|
|
|
|
backgroundColor: 'var(--auth-pills-email)',
|
|
|
|
}}
|
|
|
|
linkToPage="/docs/auth/email"
|
|
|
|
>
|
|
|
|
Email
|
|
|
|
</Pill>
|
|
|
|
)
|
2023-08-11 17:47:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function UsernameAndPasswordPill() {
|
2023-11-02 23:46:07 +03:00
|
|
|
return (
|
|
|
|
<Pill
|
|
|
|
style={{
|
|
|
|
backgroundColor: 'var(--auth-pills-username-and-pass)',
|
|
|
|
}}
|
|
|
|
linkToPage="/docs/auth/username-and-pass"
|
|
|
|
>
|
|
|
|
Username & Password
|
|
|
|
</Pill>
|
|
|
|
)
|
2023-08-11 17:47:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function GithubPill() {
|
2023-11-02 23:46:07 +03:00
|
|
|
return (
|
|
|
|
<Pill
|
|
|
|
style={{
|
|
|
|
backgroundColor: 'var(--auth-pills-github)',
|
|
|
|
}}
|
|
|
|
linkToPage="/docs/auth/social-auth/github"
|
|
|
|
>
|
|
|
|
Github
|
|
|
|
</Pill>
|
|
|
|
)
|
2023-08-11 17:47:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function GooglePill() {
|
2023-11-02 23:46:07 +03:00
|
|
|
return (
|
|
|
|
<Pill
|
|
|
|
style={{
|
|
|
|
backgroundColor: 'var(--auth-pills-google)',
|
|
|
|
}}
|
|
|
|
linkToPage="/docs/auth/social-auth/google"
|
|
|
|
>
|
|
|
|
Google
|
|
|
|
</Pill>
|
|
|
|
)
|
2023-08-11 17:47:49 +03:00
|
|
|
}
|