-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a clear button for the output and a copy button for the input
- Loading branch information
1 parent
8b4a0b6
commit 8c7a548
Showing
4 changed files
with
78 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.input { | ||
.io { | ||
min-height: rem(100); | ||
max-height: rem(275); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { rem } from "@mantine/core"; | ||
import { IconCheck, IconClearAll, IconCopy } from "@tabler/icons-react"; | ||
|
||
export function FindIconClear(state: boolean) { | ||
if (state) { | ||
return <IconCheck style={{ width: rem(69) }} />; | ||
} else { | ||
return <IconClearAll style={{ width: rem(69) }} />; | ||
} | ||
} | ||
|
||
export function FindTooltipClear(state: boolean) { | ||
return state ? "Cleared" : "Clear"; | ||
} | ||
|
||
export function FindIconCopy(state: boolean) { | ||
if (state) { | ||
return <IconCheck style={{ width: rem(69) }} />; | ||
} else { | ||
return <IconCopy style={{ width: rem(69) }} />; | ||
} | ||
} | ||
|
||
export function FindTooltipCopy(state: boolean) { | ||
return state ? "Copied" : "Copy"; | ||
} | ||
|
||
export function HandleButtonIconCopy(value: string) { | ||
if (value.length === 0) { | ||
return; | ||
} | ||
|
||
navigator.clipboard.writeText(value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters