File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed
flows/pipes/RawFluxEditor/FunctionsList/perFunction
timeMachine/components/dynamicFluxFunctionsToolbar Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 11// Libraries
22import React , { FC , useEffect } from 'react'
3+ import classnames from 'classnames'
34
45// Component
56import { DapperScrollbars } from '@influxdata/clockface'
@@ -24,11 +25,18 @@ const FluxDocsTooltipContent: FC<TooltipProps> = ({
2425 } , [ ] )
2526 const argComponent = ( ) => {
2627 if ( func . fluxParameters . length > 0 ) {
28+ let param = 'Optional'
2729 return func . fluxParameters . map ( arg => {
2830 const description = arg . headline . slice ( arg . name . length + 1 )
31+ arg . required ? ( param = 'Required' ) : param
32+
33+ const paramClass = classnames ( 'param' , {
34+ isRequired : param === 'Required' ? true : false ,
35+ } )
2936 return (
3037 < div className = "flux-function-docs--arguments" key = { arg . name } >
3138 < span > { arg . name } :</ span >
39+ < span className = { paramClass } > ({ param } )</ span >
3240 < div > { description } </ div >
3341 </ div >
3442 )
Original file line number Diff line number Diff line change 8080@import ' src/timeMachine/components/TimeMachine.scss' ;
8181@import ' src/timeMachine/components/QueryBuilder.scss' ;
8282@import ' src/timeMachine/components/fluxFunctionsToolbar/FluxFunctionsToolbar.scss' ;
83+ @import ' src/timeMachine/components/dynamicFluxFunctionsToolbar/FluxFunctionsToolbar.scss' ;
8384@import ' src/timeMachine/components/ViewOptions.scss' ;
8485@import ' src/visualization/components/ViewTypeDropdown.scss' ;
8586@import ' src/timeMachine/components/builderCard/BuilderCard.scss' ;
Original file line number Diff line number Diff line change 3333 }
3434
3535 span :nth-child (2 ) {
36- color : $c-rainforest ;
36+ color : $c-pool ;
3737 font-style : italic ;
3838 margin-right : $cf-border ;
39+
40+ & .isRequired {
41+ color : $c-fire ;
42+ }
3943 }
4044
4145 div {
Original file line number Diff line number Diff line change 11import React , { PureComponent } from 'react'
2-
2+ import classnames from 'classnames'
33interface Args {
44 headline : string
55 name : string
@@ -23,11 +23,18 @@ class TooltipArguments extends PureComponent<Props> {
2323 const { argsList} = this . props
2424
2525 if ( argsList . length > 0 ) {
26+ let param = 'Optional'
2627 return argsList . map ( argument => {
2728 const description = argument . headline . slice ( argument . name . length + 1 )
29+ argument . required ? ( param = 'Required' ) : param
30+
31+ const paramClass = classnames ( 'param' , {
32+ isRequired : param === 'Required' ? true : false ,
33+ } )
2834 return (
2935 < div className = "flux-function-docs--arguments" key = { argument . name } >
3036 < span > { argument . name } :</ span >
37+ < span className = { paramClass } > ({ param } )</ span >
3138 < div > { description } </ div >
3239 </ div >
3340 )
You can’t perform that action at this time.
0 commit comments