File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed
src/modules/networks/resources Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { notify } from "@components/Notification";
1717import Paragraph from "@components/Paragraph" ;
1818import { PeerGroupSelector } from "@components/PeerGroupSelector" ;
1919import Separator from "@components/Separator" ;
20+ import { Textarea } from "@components/Textarea" ;
2021import { useApiCall } from "@utils/api" ;
2122import {
2223 ExternalLinkIcon ,
@@ -156,6 +157,18 @@ export function ResourceModalContent({
156157 onChange = { ( e ) => setName ( e . target . value ) }
157158 />
158159 </ div >
160+ < div >
161+ < Label > Description (optional)</ Label >
162+ < HelpText >
163+ Write a short description to add more context to this resource.
164+ </ HelpText >
165+ < Textarea
166+ placeholder = { "e.g., Production, Development" }
167+ value = { description }
168+ rows = { 1 }
169+ onChange = { ( e ) => setDescription ( e . target . value ) }
170+ />
171+ </ div >
159172
160173 < ResourceSingleAddressInput value = { address } onChange = { setAddress } />
161174
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export default function ResourceNameCell({ resource }: Readonly<Props>) {
3434 < div
3535 className = { cn (
3636 "flex flex-col gap-0 text-neutral-300 font-light truncate" ,
37- "group-hover:text-neutral-100" ,
37+ "group-hover:text-neutral-100 text-left " ,
3838 ) }
3939 >
4040 < TextWithTooltip
@@ -43,6 +43,7 @@ export default function ResourceNameCell({ resource }: Readonly<Props>) {
4343 className = { "font-normal" }
4444 />
4545 < DescriptionWithTooltip
46+ maxChars = { 25 }
4647 className = { cn ( "font-normal mt-0.5 " ) }
4748 text = { resource . description }
4849 />
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { DataTableRowsPerPage } from "@components/table/DataTableRowsPerPage";
66import NoResults from "@components/ui/NoResults" ;
77import { IconCirclePlus } from "@tabler/icons-react" ;
88import { ColumnDef , SortingState } from "@tanstack/react-table" ;
9+ import { removeAllSpaces } from "@utils/helpers" ;
910import { Layers3Icon } from "lucide-react" ;
1011import * as React from "react" ;
1112import { useState } from "react" ;
@@ -36,6 +37,12 @@ const NetworkResourceColumns: ColumnDef<NetworkResource>[] = [
3637 return < ResourceNameCell resource = { row . original } /> ;
3738 } ,
3839 } ,
40+ {
41+ id : "description" ,
42+ accessorKey : "description" ,
43+ accessorFn : ( resource ) =>
44+ removeAllSpaces ( resource ?. description || "" ) . toLowerCase ( ) ,
45+ } ,
3946 {
4047 id : "address" ,
4148 accessorKey : "address" ,
@@ -122,7 +129,9 @@ export default function ResourcesTable({
122129 icon = { < Layers3Icon size = { 20 } /> }
123130 />
124131 }
125- columnVisibility = { { } }
132+ columnVisibility = { {
133+ description : false ,
134+ } }
126135 paginationPaddingClassName = { "px-0 pt-8" }
127136 rightSide = { ( ) => (
128137 < Button
You can’t perform that action at this time.
0 commit comments