How to use @tds/util-helpers - 10 common examples

To help you get started, we’ve selected a few @tds/util-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github telus / tds-core / shared / components / VideoSplash / VideoSplash.jsx View on Github external
const VideoSplash = ({ poster, videoLength, label, customButton, ...rest }) => {
  return (
    
      {customButton || } label={label} videoLength={videoLength} />}
    
  )
}
github telus / tds-core / packages / Checkbox / Checkbox.jsx View on Github external
const Checkbox = React.forwardRef(({ id, name, value, label, feedback, error, ...rest }, ref) => (
  
    {feedback === 'error' && renderError(error, getErrorId(name, value, id))}
    
    
      
        
          
        
        
          
        
      
github telus / tds-core / packages / Select / Select.jsx View on Github external
{renderLabel(fieldId.identity(), label, hint, hintPosition, hintId, tooltip)}
        {helper && renderHelper(helper, helperId, feedback, value)}
        {error && feedback === 'error' && renderError(error, errorId)}
        <div>
          
            
              {placeholder &amp;&amp; (
                <option disabled="" value="">
                  {placeholder}
                </option>
              )}
              {renderOptions(options)}
            

            {!rest.disabled &amp;&amp; (
              
                
                </div>
github telus / tds-core / shared / components / Icon / Icon.jsx View on Github external
const Icon = ({ symbol, variant, size, ...rest }) =&gt; (
  
)
github telus / tds-core / packages / Heading / Heading.jsx View on Github external
const Heading = forwardRef(({ level, tag = level, invert, children, ...rest }, ref) =&gt; {
  return (
    
      {children}
    
  )
})
github telus / tds-core / packages / Benefit / BenefitWithHeading / BenefitWithHeading.jsx View on Github external
const BenefitWithHeading = ({ icon, children, ...rest }) =&gt; (
  
    {React.Children.map(children, child =&gt; cloneChild(icon, child))}
  
)
github telus / tds-core / packages / Tooltip / Tooltip.jsx View on Github external
trueDirection = this.state.tooltipPos &gt; this.state.halfPageWidth ? 'left' : 'right'
    } else {
      trueDirection = direction
    }

    const bubbleWidth =
      trueDirection === 'left'
        ? this.state.tooltipPos
        : this.state.halfPageWidth * 2 - this.state.tooltipPos - 16

    const width = {
      width: `calc(${bubbleWidth}px - 1rem - 0.5rem)`,
    }

    return (
      
        
          
            {children}
github telus / tds-core / packages / ButtonGroup / ButtonGroupItem / ButtonGroupItem.jsx View on Github external
name,
      value,
      checked,
      onChange,
      onFocus,
      onBlur,
      children,
      defaultChecked,
      readOnly,
      ...rest
    },
    ref
  ) =&gt; {
    const itemId = generateId(name).postfix(value)
    return (
      
        
        {children}
      
    )
github telus / tds-core / packages / ExpandCollapse / Panels.jsx View on Github external
const Panels = ({ topDivider, isPanelOpen, togglePanel, tag, children, ...rest }) =&gt; (
  
    {topDivider &amp;&amp; }

    {React.Children.toArray(children)
      .filter(Boolean)
      .map(panel =&gt; {
        const { id, header, subtext, tertiaryText, disabled, onToggle } = panel.props

        return (
github telus / tds-core / scripts / scaffolding / Component.jsx View on Github external
const $COMPONENT$ = ({ ...rest }) =&gt; <div>
</div>

@tds/util-helpers

TDS helpers

MIT
Latest version published 2 years ago

Package Health Score

63 / 100
Full package analysis

Similar packages