File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
libs/remix-ui/grid-view/src/lib Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ interface RemixUIGridCellProps {
30
30
handleExpand ?: any
31
31
id : string
32
32
searchKeywords ?: string [ ]
33
+ cornerBtnLabel ?: string
34
+ cornerBtnCallback ?: ( ) => void
35
+ cornerBtnCSS ?: string
33
36
}
34
37
35
38
export const RemixUIGridCell = ( props : RemixUIGridCellProps ) => {
@@ -110,15 +113,18 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
110
113
}
111
114
</ div > }
112
115
{ props . children }
113
- { filterCon . showPin && < button
114
- className = { `${ pinned ? 'fas fa-toggle-on fa-lg text-dark' : 'fas fa-toggle-off fa-lg text-secondary' } ` + ` fa-regular border-0 p-0 mt-2 align-self-end mr-1 remixui_grid_cell_pin` }
115
- style = { { fontSize : 'large' } }
116
- data-id = { `${ pinned ? `${ props . id } -pinned` : `${ props . id } -unpinned` } ` }
117
- onClick = { async ( ) => {
118
- if ( ! props . pinStateCallback ) setPinned ( ! pinned )
119
- if ( await props . pinStateCallback ( ! pinned ) ) setPinned ( ! pinned )
120
- } }
121
- > </ button > }
116
+ < div className = 'd-flex w-100 flex-row justify-content-between' >
117
+ { props . cornerBtnLabel || props . cornerBtnCSS ? < button className = { props . cornerBtnCSS } onClick = { ( ) => props . cornerBtnCallback && props . cornerBtnCallback ( ) } > { props . cornerBtnLabel } </ button > : < div > </ div > }
118
+ { filterCon . showPin && < button
119
+ className = { `${ pinned ? 'fas fa-toggle-on fa-lg text-dark' : 'fas fa-toggle-off fa-lg text-secondary' } ` + ` fa-regular border-0 p-0 mt-2 align-self-end mr-1 remixui_grid_cell_pin` }
120
+ style = { { fontSize : 'large' } }
121
+ data-id = { `${ pinned ? `${ props . id } -pinned` : `${ props . id } -unpinned` } ` }
122
+ onClick = { async ( ) => {
123
+ if ( ! props . pinStateCallback ) setPinned ( ! pinned )
124
+ if ( await props . pinStateCallback ( ! pinned ) ) setPinned ( ! pinned )
125
+ } }
126
+ > </ button > }
127
+ </ div >
122
128
</ div >
123
129
</ div >
124
130
You can’t perform that action at this time.
0 commit comments