-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dashboard] Feature: Modules UI changes (#5437)
https://linear.app/thirdweb/issue/DASH-469/small-changes-for-modules-ui <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the functionality and user experience of the `Transferable`, `Claimable`, and `Royalty` components in the dashboard application, particularly by adding support for ERC20 tokens and improving form handling for royalties. ### Detailed summary - Added support for `isErc20` state in `Transferable` and `Claimable` components. - Updated UI to display messages related to transfer restrictions and accounts. - Introduced `SequentialTokenIdFieldset` to handle token ID inputs. - Changed royalty handling from BPS to percentage in `Royalty` component. - Improved form validation and error messaging for royalty inputs. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
Showing
6 changed files
with
127 additions
and
25 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
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
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
32 changes: 32 additions & 0 deletions
32
.../src/components/contract-components/contract-deploy-form/sequential-token-id-fieldset.tsx
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,32 @@ | ||
import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; | ||
import { FormControl } from "@/components/ui/form"; | ||
import { SolidityInput } from "contract-ui/components/solidity-inputs"; | ||
import type { UseFormRegisterReturn } from "react-hook-form"; | ||
|
||
interface SequentialTokenIdFieldsetProps { | ||
isInvalid: boolean; | ||
register: UseFormRegisterReturn; | ||
errorMessage: string | undefined; | ||
} | ||
|
||
export const SequentialTokenIdFieldset: React.FC< | ||
SequentialTokenIdFieldsetProps | ||
> = (props) => { | ||
return ( | ||
<FormFieldSetup | ||
htmlFor="startTokenId" | ||
label="Start Token ID" | ||
isRequired={true} | ||
errorMessage={props.errorMessage} | ||
helperText="The starting token ID for the NFT collection." | ||
> | ||
<FormControl> | ||
<SolidityInput | ||
solidityType="uint256" | ||
variant="filled" | ||
{...props.register} | ||
/> | ||
</FormControl> | ||
</FormFieldSetup> | ||
); | ||
}; |