How to use @crave/farmblocks-tooltip - 10 common examples

To help you get started, we’ve selected a few @crave/farmblocks-tooltip 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 CraveFood / farmblocks / packages / more-info / src / components / MoreInfo.js View on Github external
);
};

MoreInfo.propTypes = {
  children: PropTypes.node.isRequired,
  trigger: PropTypes.node,
  text: PropTypes.string,
  // eslint-disable-next-line react/forbid-prop-types
  tooltipProps: PropTypes.object,
};

MoreInfo.defaultProps = {
  trigger: ,
  tooltipProps: {
    positionX: POSITIONS.X.CENTER,
  },
};

export default MoreInfo;
github CraveFood / farmblocks / packages / hoc-input / src / formInput.js View on Github external
};

    static defaultProps = {
      value: "",
      type: "text",
      focused: false,
      active: false,
      disabled: false,
      onChange: () => null,
      onFocus: () => null,
      onBlur: () => null,
      input: null,
      refName: "ref",
      clearable: false,
      clearIcon: "wg-close-int",
      moreInfoTooltipProps: { positionX: POSITIONS.X.LEFT },
      autoControlFocusedStyle: true,
    };

    state = {
      value: getValueFromProps(this.props),
      focused: this.props.focused,
    };

    componentDidMount() {
      if (this.props.focused) {
        this.setInputFocus();
      }
    }

    componentDidUpdate = prevProps => {
      if (this.props.focused && !prevProps.focused) {
github CraveFood / farmblocks / packages / label / src / Label.js View on Github external
className="labelText"
        fontWeight="title"
        size={fontSizes.SMALL}
        lineHeight="16px"
        letterSpacing="2px"
        upper
        type={labelColor(props)}
      >
        {children}
      

      {moreInfoContent && (
        
          {moreInfoContent}
        
      )}
    
  );
};
github CraveFood / farmblocks / packages / hoc-input / src / formInput.story.js View on Github external
.add("with label and more info", () => (
    
  ))
  .add("with prefix", () => (
github CraveFood / farmblocks / packages / more-info / src / components / MoreInfo.story.js View on Github external
.add("Without text - tooltip right aligned", () => (
    <div style="{{">
      
        Awesome tooltip
      
    </div>
  ))
  .add("extended style", () =&gt; (
github CraveFood / farmblocks / packages / more-info / src / components / MoreInfo.story.js View on Github external
.add("Without text - tooltip left aligned", () =&gt; (
    <div>
      
        Tooltip left aligned with text
      
    </div>
  ))
  .add("Without text - tooltip right aligned", () =&gt; (
github CraveFood / farmblocks / packages / popover / src / Popover.story.js View on Github external
.add("Center aligned", () =&gt; (
    <div style="{{">
      Trigger}
        content={() =&gt; }
        tooltipProps={{ positionX: POSITIONS.X.CENTER }}
        onOutsideClick={action("onOutsideClick")}
      /&gt;
    </div>
  ))
  .add("Disabled", () =&gt; (
github CraveFood / farmblocks / packages / label / src / Label.story.js View on Github external
.add("With more info right aligned", () =&gt; (
    <label>
      Default Label
    </label>
  ))
  .add("extended style", () =&gt; (
github CraveFood / farmblocks / packages / popover / src / Popover.story.js View on Github external
.add("Button as a trigger - Right aligned", () =&gt; (
    <div style="{{">
      Trigger}
        content={() =&gt; }
        tooltipProps={{ positionX: POSITIONS.X.RIGHT }}
        onOutsideClick={action("onOutsideClick")}
      /&gt;
    </div>
  ))
  .add("Center aligned", () =&gt; (

@crave/farmblocks-tooltip

Tooltip component

MIT
Latest version published 2 years ago

Package Health Score

49 / 100
Full package analysis