feat: Add open in podcast app button (and minor stuff) #29

Merged
timharek merged 5 commits from feature-open-in-podcast-app into main 2024-04-12 12:56:03 +00:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 32065b3eda - Show all commits

View File

@ -13,7 +13,7 @@ type Props = {
} & JSX.HTMLAttributes<HTMLButtonElement>; } & JSX.HTMLAttributes<HTMLButtonElement>;
export default function CopyButton(props: Props) { export default function CopyButton(props: Props) {
const { copyText, disabled = false, children, ...buttonProps } = props; const { copyText, disabled = false, children, className = "", ...buttonProps } = props;
const [clicked, setClicked] = useState(false); const [clicked, setClicked] = useState(false);
const startReset = () => { const startReset = () => {
@ -30,6 +30,7 @@ export default function CopyButton(props: Props) {
startReset(); startReset();
}} }}
disabled={!IS_BROWSER || disabled} disabled={!IS_BROWSER || disabled}
className={`${className} ${clicked ? "bg-green-500" : ""}`}
{...buttonProps} {...buttonProps}
> >
{clicked {clicked