mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 08:54:13 +00:00
feat: add share modal
This commit is contained in:
parent
26bf01690c
commit
35e32152b1
3 changed files with 40 additions and 2 deletions
|
|
@ -1,4 +1,31 @@
|
||||||
.heading {
|
.heading {
|
||||||
font-family: var(--font-heading);
|
font-family: var(--font-heading);
|
||||||
|
font-size: var(--font-md);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
margin-top: 12px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: var(--color-foreground-subtle);
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputWrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 45px;
|
||||||
|
margin-top: 12px;
|
||||||
|
background-color: var(--color-neutral-50);
|
||||||
|
border: 1px solid var(--color-neutral-200);
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
& input {
|
||||||
|
flex-grow: 1;
|
||||||
|
height: 100%;
|
||||||
|
color: red;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
|
import { IoCopyOutline } from 'react-icons/io5/index';
|
||||||
|
|
||||||
import { Modal } from '@/components/modal';
|
import { Modal } from '@/components/modal';
|
||||||
|
|
||||||
|
|
@ -16,7 +17,17 @@ export function Share() {
|
||||||
|
|
||||||
{createPortal(
|
{createPortal(
|
||||||
<Modal show={isModalOpen} onClose={() => setIsModalOpen(false)}>
|
<Modal show={isModalOpen} onClose={() => setIsModalOpen(false)}>
|
||||||
<h1 className={styles.heading}>Share Sounds!</h1>
|
<h1 className={styles.heading}>Share your sound selection!</h1>
|
||||||
|
<p className={styles.desc}>
|
||||||
|
Copy and send the following link to the person you want to share
|
||||||
|
your selection with.
|
||||||
|
</p>
|
||||||
|
<div className={styles.inputWrapper}>
|
||||||
|
<input type="text" onFocus={e => e.stopPropagation()} />
|
||||||
|
<button>
|
||||||
|
<IoCopyOutline />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</Modal>,
|
</Modal>,
|
||||||
document.body,
|
document.body,
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ export function Menu() {
|
||||||
|
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
{isOpen && (
|
{isOpen && (
|
||||||
<FloatingFocusManager context={context} modal={false}>
|
<FloatingFocusManager context={context}>
|
||||||
<div
|
<div
|
||||||
ref={refs.setFloating}
|
ref={refs.setFloating}
|
||||||
style={floatingStyles}
|
style={floatingStyles}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue