Skip to content

Commit

Permalink
[ML] Copied and adapted form-label directive description to component…
Browse files Browse the repository at this point in the history
… FormLabel.
  • Loading branch information
walterra committed Jul 23, 2018
1 parent 0bb4939 commit 2073221
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions x-pack/plugins/ml/public/components/form_label/form_label.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ import React, { Component } from 'react';

import { JsonTooltip } from '../json_tooltip/json_tooltip';

// Component for creating a form label including a hoverable icon
// to provide additional information in a tooltip. Label and tooltip
// text elements get unique ids based on label-id so they can be
// referenced by attributes, for example:
//
// <FormLabel labelId="uid">Label Text</FormLabel>
// <input
// type="text"
// aria-labelledby="ml_aria_label_uid"
// aria-describedby="ml_aria_description_uid"
// />
//
// Writing this as a class based component because stateless components
// cannot use ref(). Once angular is completely gone this can be rewritten
// as a function stateless component.
Expand Down

0 comments on commit 2073221

Please sign in to comment.