mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
style: redesign mii page
also adds a gender viewer!
This commit is contained in:
parent
ec1c19204d
commit
8753358a48
3 changed files with 143 additions and 89 deletions
|
|
@ -13,9 +13,10 @@ interface Props {
|
|||
miiId: number;
|
||||
miiName: string;
|
||||
likes: number;
|
||||
inMiiPage?: boolean;
|
||||
}
|
||||
|
||||
export default function DeleteMiiButton({ miiId, miiName, likes }: Props) {
|
||||
export default function DeleteMiiButton({ miiId, miiName, likes, inMiiPage }: Props) {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [isVisible, setIsVisible] = useState(false);
|
||||
|
||||
|
|
@ -49,9 +50,16 @@ export default function DeleteMiiButton({ miiId, miiName, likes }: Props) {
|
|||
|
||||
return (
|
||||
<>
|
||||
<button onClick={() => setIsOpen(true)} title="Delete Mii" data-tooltip="Delete" className="cursor-pointer aspect-square">
|
||||
<Icon icon="mdi:trash" />
|
||||
</button>
|
||||
{inMiiPage ? (
|
||||
<button onClick={() => setIsOpen(true)} className="cursor-pointer">
|
||||
<Icon icon="mdi:trash" />
|
||||
<span className="text-xs">Delete</span>
|
||||
</button>
|
||||
) : (
|
||||
<button onClick={() => setIsOpen(true)} title="Delete Mii" data-tooltip="Delete" className="cursor-pointer aspect-square">
|
||||
<Icon icon="mdi:trash" />
|
||||
</button>
|
||||
)}
|
||||
|
||||
{isOpen &&
|
||||
createPortal(
|
||||
|
|
|
|||
|
|
@ -36,13 +36,9 @@ export default function ScanTutorialButton() {
|
|||
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setIsOpen(true)}
|
||||
className="text-3xl aspect-square flex justify-center items-center cursor-pointer underline-offset-2 hover:underline"
|
||||
data-tooltip={"Add Mii tutorial"}
|
||||
>
|
||||
<button type="button" onClick={() => setIsOpen(true)} className="text-3xl cursor-pointer">
|
||||
<Icon icon="fa:question-circle" />
|
||||
<span className="text-xs">Tutorial</span>
|
||||
</button>
|
||||
|
||||
{isOpen &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue