File tree Expand file tree Collapse file tree 3 files changed +41
-11
lines changed
Expand file tree Collapse file tree 3 files changed +41
-11
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import { Button } from '~/ui/lib/Button'
3939import { EmptyMessage } from '~/ui/lib/EmptyMessage'
4040import { PageHeader , PageTitle } from '~/ui/lib/PageHeader'
4141import { TableActions , TableEmptyBox } from '~/ui/lib/Table'
42+ import { TipIcon } from '~/ui/lib/TipIcon'
4243import { accessTypeLabel , getBadgeColor } from '~/util/access'
4344import { groupBy , isTruthy , sortBy } from '~/util/array'
4445
@@ -130,7 +131,15 @@ export function ProjectAccessPage() {
130131 cell : ( props ) => accessTypeLabel ( props . getValue ( ) ) ,
131132 } ) ,
132133 colHelper . accessor ( 'roleBadges' , {
133- header : 'Role' ,
134+ header : ( ) => (
135+ < span className = "inline-flex items-center" >
136+ Role
137+ < TipIcon className = "ml-2" >
138+ A user or group's effective role for this project is the strongest role
139+ on either the silo or project.
140+ </ TipIcon >
141+ </ span >
142+ ) ,
134143 cell : ( props ) => (
135144 < ListPlusCell tooltipTitle = "Other roles" >
136145 { props . getValue ( ) . map ( ( { roleName, roleSource } ) => (
Original file line number Diff line number Diff line change 88import cn from 'classnames'
99import type { ElementType , PropsWithChildren } from 'react'
1010
11- import { Question12Icon } from '@oxide/design-system/icons/react'
12-
13- import { Tooltip } from '~/ui/lib/Tooltip'
11+ import { TipIcon } from './TipIcon'
1412
1513interface FieldLabelProps {
1614 id : string
@@ -43,13 +41,7 @@ export const FieldLabel = ({
4341 </ span >
4442 ) }
4543 </ Component >
46- { tip && (
47- < Tooltip content = { tip } placement = "top" >
48- < button className = "svg:pointer-events-none" type = "button" >
49- < Question12Icon className = "text-quinary" />
50- </ button >
51- </ Tooltip >
52- ) }
44+ { tip && < TipIcon > { tip } </ TipIcon > }
5345 </ div >
5446 )
5547}
Original file line number Diff line number Diff line change 1+ /*
2+ * This Source Code Form is subject to the terms of the Mozilla Public
3+ * License, v. 2.0. If a copy of the MPL was not distributed with this
4+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
5+ *
6+ * Copyright Oxide Computer Company
7+ */
8+ import cn from 'classnames'
9+
10+ import { Question12Icon } from '@oxide/design-system/icons/react'
11+
12+ import { Tooltip } from './Tooltip'
13+
14+ type TipIconProps = {
15+ children : React . ReactNode
16+ className ?: string
17+ }
18+ export function TipIcon ( { children, className } : TipIconProps ) {
19+ return (
20+ < Tooltip content = { children } placement = "top" >
21+ < button
22+ className = { cn ( 'inline-flex svg:pointer-events-none' , className ) }
23+ type = "button"
24+ >
25+ < Question12Icon className = "text-quinary" />
26+ </ button >
27+ </ Tooltip >
28+ )
29+ }
You can’t perform that action at this time.
0 commit comments