11import React from 'react' ;
22
3- import { renderToHtml } from '../../services' ;
4-
53import { GuideSectionTypes } from '../../components' ;
64import { EuiCode } from '../../../../src/components' ;
75
@@ -12,25 +10,20 @@ import { PrefixSufix } from './bothPrefixSuffix';
1210import { UseGeneratedHtmlId } from './use_generated_html_id' ;
1311
1412const htmlIdGeneratorSource = require ( '!!raw-loader!./html_id_generator' ) ;
15- const htmlIdGeneratorHtml = renderToHtml ( IdGenerator ) ;
1613const htmlIdGeneratorSnippet = ' htmlIdGenerator()()' ;
1714
1815const htmlIdGeneratorPrefixSource = require ( '!!raw-loader!./html_id_generator_prefix' ) ;
19- const htmlIdGeneratorPrefixHtml = renderToHtml ( HtmlIdGeneratorPrefix ) ;
2016const htmlIdGeneratorPrefixSnippet = " htmlIdGenerator('prefix')()" ;
2117
2218const HtmlIdGeneratorSuffixSource = require ( '!!raw-loader!./html_id_generator_suffix' ) ;
23- const HtmlIdGeneratorSuffixHtml = renderToHtml ( HtmlIdGeneratorSuffix ) ;
2419const suffixSnippet = " htmlIdGenerator()('suffix')" ;
2520
2621const PrefixSufixSource = require ( '!!raw-loader!./bothPrefixSuffix' ) ;
27- const PrefixSufixHtml = renderToHtml ( PrefixSufix ) ;
2822const prefixSuffixSnippet = " htmlIdGenerator('prefix')('suffix')" ;
2923
3024const UseGeneratedHtmlIdSource = require ( '!!raw-loader!./use_generated_html_id' ) ;
31- const UseGeneratedHtmlIdHtml = renderToHtml ( UseGeneratedHtmlId ) ;
3225const useGeneratedHtmlIdSnippet =
33- " useGeneratedHtmlId({ prefix: 'Some' , suffix: 'id' , idFromProps: id })" ;
26+ ' useGeneratedHtmlId({ prefix, suffix, idFromProps: id })' ;
3427
3528export const HtmlIdGeneratorExample = {
3629 title : 'HTML ID generator' ,
@@ -41,10 +34,6 @@ export const HtmlIdGeneratorExample = {
4134 type : GuideSectionTypes . JS ,
4235 code : htmlIdGeneratorSource ,
4336 } ,
44- {
45- type : GuideSectionTypes . HTML ,
46- code : htmlIdGeneratorHtml ,
47- } ,
4837 ] ,
4938 text : (
5039 < p >
@@ -66,10 +55,6 @@ export const HtmlIdGeneratorExample = {
6655 type : GuideSectionTypes . JS ,
6756 code : htmlIdGeneratorPrefixSource ,
6857 } ,
69- {
70- type : GuideSectionTypes . HTML ,
71- code : htmlIdGeneratorPrefixHtml ,
72- } ,
7358 ] ,
7459 text : (
7560 < p >
@@ -87,10 +72,6 @@ export const HtmlIdGeneratorExample = {
8772 type : GuideSectionTypes . JS ,
8873 code : HtmlIdGeneratorSuffixSource ,
8974 } ,
90- {
91- type : GuideSectionTypes . HTML ,
92- code : HtmlIdGeneratorSuffixHtml ,
93- } ,
9475 ] ,
9576 text : (
9677 < p >
@@ -108,10 +89,6 @@ export const HtmlIdGeneratorExample = {
10889 type : GuideSectionTypes . JS ,
10990 code : PrefixSufixSource ,
11091 } ,
111- {
112- type : GuideSectionTypes . HTML ,
113- code : PrefixSufixHtml ,
114- } ,
11592 ] ,
11693 text : (
11794 < p >
@@ -129,10 +106,6 @@ export const HtmlIdGeneratorExample = {
129106 type : GuideSectionTypes . JS ,
130107 code : UseGeneratedHtmlIdSource ,
131108 } ,
132- {
133- type : GuideSectionTypes . HTML ,
134- code : UseGeneratedHtmlIdHtml ,
135- } ,
136109 ] ,
137110 text : (
138111 < >
@@ -146,9 +119,9 @@ export const HtmlIdGeneratorExample = {
146119 < p >
147120 < EuiCode > useGeneratedHtmlId</ EuiCode > optionally takes{ ' ' }
148121 < EuiCode > suffix</ EuiCode > and < EuiCode > prefix</ EuiCode > parameters
149- with the same behavior as above , as well as an { ' ' }
150- < EuiCode > idFromProps</ EuiCode > option for components that allow
151- end-users to set their own custom IDs.
122+ producing similar results as < EuiCode > htmlIdGenerator </ EuiCode > , as
123+ well as an < EuiCode > idFromProps</ EuiCode > option for components that
124+ allow end-users to set their own custom IDs.
152125 </ p >
153126 </ >
154127 ) ,
0 commit comments