// Copyright (c) Meta Platforms, Inc. and affiliates. 'use client'; import {useState} from 'react'; import {ToggleButton} from '@astryxdesign/core/ToggleButton'; import {Stack} from '@astryxdesign/core/Layout'; import {Text} from '@astryxdesign/core/Text'; import {Icon} from '@astryxdesign/core/Icon'; import { StarIcon as StarOutline, BookmarkIcon as BookmarkOutline, BellIcon as NotificationIcon, BellSlashIcon as NotificationOffIcon, } from '@heroicons/react/24/outline'; import { StarIcon as StarSolid, BookmarkIcon as BookmarkSolid, } from '@heroicons/react/24/solid'; export default function ToggleButtonIconSwap() { const [isFavorited, setIsFavorited] = useState(false); const [isBookmarked, setIsBookmarked] = useState(true); const [isMuted, setIsMuted] = useState(false); return ( Outline → solid icon swap on press } pressedIcon={} isPressed={isFavorited} onPressedChange={setIsFavorited} isIconOnly /> } pressedIcon={} isPressed={isBookmarked} onPressedChange={setIsBookmarked} isIconOnly /> } pressedIcon={} isPressed={isMuted} onPressedChange={setIsMuted} isIconOnly /> ); }