Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
"fork-ts-checker-webpack-plugin": "^5.1.0",
"get-port": "^5.1.1",
"glob": "^7.1.6",
"html": "^1.0.0",
"html-format": "^1.0.1",
"html-webpack-plugin": "^4.4.1",
"jest": "^24.1.0",
Expand Down
3 changes: 0 additions & 3 deletions src-docs/src/components/guide_section/guide_section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
GuideSectionExampleTabs,
GuideSectionExampleTabsProps,
} from './guide_section_parts/guide_section_tabs';
import { GuideSectionTypes } from './guide_section_types';

export interface GuideSection {
id?: string;
Expand Down Expand Up @@ -110,8 +109,6 @@ export const GuideSection: FunctionComponent<GuideSection> = ({

if (source) {
source.map((source) => {
// Forever skipping the HTML tab
if (source.type === GuideSectionTypes.HTML) return;
tabs.push({
// @ts-ignore Complicated
...GuideSectionCodeTypesMap[source.type],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export const GuideSectionTypes = {
JS: 'JS',
TSX: 'TSX',
HTML: 'HTML',
SNIPPET: 'SNIPPET',
SASS: 'SASS',
};
2 changes: 0 additions & 2 deletions src-docs/src/services/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export { renderToHtml } from './string/render_to_html';

export { translateUsingPseudoLocale } from './string/pseudo_locale_translator';

export {
Expand Down
31 changes: 0 additions & 31 deletions src-docs/src/services/string/render_to_html.js

This file was deleted.

7 changes: 0 additions & 7 deletions src-docs/src/views/aspect_ratio/aspect_ratio_example.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React, { Fragment } from 'react';

import { renderToHtml } from '../../services';

import { GuideSectionTypes } from '../../components';
import {
EuiLink,
Expand All @@ -13,7 +11,6 @@ import aspectRatioConfig from './playground';

import AspectRatio from './aspect_ratio';
const aspectRatioSource = require('!!raw-loader!./aspect_ratio');
const aspectRatioHtml = renderToHtml(AspectRatio);

const aspectRatioSnippet = `<EuiAspectRatio width={16} height={9}>
<!-- Embed goes here -->
Expand All @@ -28,10 +25,6 @@ export const AspectRatioExample = {
type: GuideSectionTypes.JS,
code: aspectRatioSource,
},
{
type: GuideSectionTypes.HTML,
code: aspectRatioHtml,
},
],
text: (
<Fragment>
Expand Down
27 changes: 0 additions & 27 deletions src-docs/src/views/avatar/avatar_example.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import React from 'react';

import { renderToHtml } from '../../services';

import { GuideSectionTypes } from '../../components';

import { EuiAvatar, EuiCode } from '../../../../src/components';
import avatarConfig from './playground';

import Avatar from './avatar';
const avatarSource = require('!!raw-loader!./avatar');
const avatarHtml = renderToHtml(Avatar);
const avatarSnippet = [
`<EuiAvatar name="Raphael" />
`,
Expand All @@ -20,7 +17,6 @@ const avatarSnippet = [

import AvatarInitials from './avatar_initials';
const avatarInitialsSource = require('!!raw-loader!./avatar_initials');
const avatarInitialsHtml = renderToHtml(AvatarInitials);
const avatarInitialsSnippet = [
`<EuiAvatar name="Kibana" initialsLength={2}/>
`,
Expand All @@ -32,15 +28,13 @@ const avatarInitialsSnippet = [

import AvatarTypes from './avatar_type';
const avatarTypesSource = require('!!raw-loader!./avatar_type');
const avatarTypesHtml = renderToHtml(AvatarTypes);
const avatarTypesSnippet = [
`<EuiAvatar type="space" name="Engineering Space" />
`,
];

import AvatarIcons from './avatar_icon';
const avatarIconsSource = require('!!raw-loader!./avatar_icon');
const avatarIconsHtml = renderToHtml(AvatarIcons);
const avatarIconsSnippet = [
`<EuiAvatar name="Management" iconType="managementApp" />
`,
Expand All @@ -52,7 +46,6 @@ const avatarIconsSnippet = [

import AvatarDisabled from './avatar_disabled';
const avatarDisabledSource = require('!!raw-loader!./avatar_disabled');
const avatarDisabledHtml = renderToHtml(AvatarDisabled);
const avatarDisabledSnippet = [
`<EuiAvatar isDisabled={true} name="Avatar" />
`,
Expand All @@ -67,10 +60,6 @@ export const AvatarExample = {
type: GuideSectionTypes.JS,
code: avatarSource,
},
{
type: GuideSectionTypes.HTML,
code: avatarHtml,
},
],
text: (
<div>
Expand All @@ -96,10 +85,6 @@ export const AvatarExample = {
type: GuideSectionTypes.JS,
code: avatarInitialsSource,
},
{
type: GuideSectionTypes.HTML,
code: avatarInitialsHtml,
},
],
text: (
<div>
Expand All @@ -126,10 +111,6 @@ export const AvatarExample = {
type: GuideSectionTypes.JS,
code: avatarTypesSource,
},
{
type: GuideSectionTypes.HTML,
code: avatarTypesHtml,
},
],
text: (
<div>
Expand All @@ -152,10 +133,6 @@ export const AvatarExample = {
type: GuideSectionTypes.JS,
code: avatarIconsSource,
},
{
type: GuideSectionTypes.HTML,
code: avatarIconsHtml,
},
],
text: (
<div>
Expand Down Expand Up @@ -187,10 +164,6 @@ export const AvatarExample = {
type: GuideSectionTypes.JS,
code: avatarDisabledSource,
},
{
type: GuideSectionTypes.HTML,
code: avatarDisabledHtml,
},
],
text: (
<div>
Expand Down
42 changes: 0 additions & 42 deletions src-docs/src/views/badge/badge_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React, { Fragment } from 'react';

import { Link } from 'react-router-dom';

import { renderToHtml } from '../../services';

import { GuideSectionTypes } from '../../components';

import {
Expand All @@ -23,7 +21,6 @@ import {
import Badge from './badge';

const badgeSource = require('!!raw-loader!./badge');
const badgeHtml = renderToHtml(Badge);
const badgeSnippet = [
`<EuiBadge>Default</EuiBadge>
`,
Expand All @@ -39,13 +36,11 @@ const badgeSnippet = [

import BadgeWithIcon from './badge_with_icon';
const badgeWithIconSource = require('!!raw-loader!./badge_with_icon');
const badgeWithIconHtml = renderToHtml(BadgeWithIcon);
const badgeWithIconSnippet = `<EuiBadge color="hollow" iconType="cross" iconSide="right">Label</EuiBadge>
`;

import BadgeButton from './badge_button';
const badgeButtonSource = require('!!raw-loader!./badge_button');
const badgeButtonHtml = renderToHtml(BadgeButton);
const badgeButtonSnippet = [
`<EuiBadge
color="primary"
Expand Down Expand Up @@ -78,7 +73,6 @@ const badgeButtonSnippet = [

import BadgeHealth from './badge_health';
const badgeHealthSource = require('!!raw-loader!./badge_health');
const badgeHealthHtml = renderToHtml(BadgeHealth);
const badgeHealthSnippet = [
`<EuiBadge color="success">Healthy</EuiBadge>
`,
Expand All @@ -90,12 +84,10 @@ const badgeHealthSnippet = [

import BadgeHref from './badge_href';
const badgeHrefSource = require('!!raw-loader!./badge_href');
const badgeHrefHtml = renderToHtml(BadgeHref);
const badgeHrefSnippet = ['<EuiBadge href="#" />'];

import BadgeTruncate from './badge_truncate';
const badgeTruncateSource = require('!!raw-loader!./badge_truncate');
const badgeTruncateHtml = renderToHtml(BadgeTruncate);
const badgeTruncateSnippet = [
`<EuiBadgeGroup gutterSize="s">
<EuiBadge />
Expand All @@ -105,7 +97,6 @@ const badgeTruncateSnippet = [

import BetaBadge from './beta_badge';
const betaBadgeSource = require('!!raw-loader!./beta_badge');
const betaBadgeHtml = renderToHtml(BetaBadge);
const betaBadgeSnippet = [
`<EuiBetaBadge label="Beta" />
`,
Expand All @@ -117,7 +108,6 @@ const betaBadgeSnippet = [

import NotificationBadge from './notification_badge';
const notificationBadgeSource = require('!!raw-loader!./notification_badge');
const notificationBadgeHtml = renderToHtml(NotificationBadge);
const notificationBadgeSnippet = `<EuiNotificationBadge>3</EuiNotificationBadge>
`;

Expand All @@ -130,10 +120,6 @@ export const BadgeExample = {
type: GuideSectionTypes.JS,
code: badgeSource,
},
{
type: GuideSectionTypes.HTML,
code: badgeHtml,
},
],
text: (
<p>
Expand All @@ -156,10 +142,6 @@ export const BadgeExample = {
type: GuideSectionTypes.JS,
code: badgeWithIconSource,
},
{
type: GuideSectionTypes.HTML,
code: badgeWithIconHtml,
},
],
text: <p>Badges can use icons on the left and right (default) sides.</p>,
snippet: badgeWithIconSnippet,
Expand All @@ -172,10 +154,6 @@ export const BadgeExample = {
type: GuideSectionTypes.JS,
code: badgeButtonSource,
},
{
type: GuideSectionTypes.HTML,
code: badgeButtonHtml,
},
],
text: (
<div>
Expand Down Expand Up @@ -208,10 +186,6 @@ export const BadgeExample = {
type: GuideSectionTypes.JS,
code: badgeHealthSource,
},
{
type: GuideSectionTypes.HTML,
code: badgeHealthHtml,
},
],
text: (
<div>
Expand All @@ -231,10 +205,6 @@ export const BadgeExample = {
type: GuideSectionTypes.JS,
code: badgeHrefSource,
},
{
type: GuideSectionTypes.HTML,
code: badgeHrefHtml,
},
],
text: (
<div>
Expand All @@ -254,10 +224,6 @@ export const BadgeExample = {
type: GuideSectionTypes.JS,
code: badgeTruncateSource,
},
{
type: GuideSectionTypes.HTML,
code: badgeTruncateHtml,
},
],
text: (
<Fragment>
Expand Down Expand Up @@ -289,10 +255,6 @@ export const BadgeExample = {
type: GuideSectionTypes.JS,
code: betaBadgeSource,
},
{
type: GuideSectionTypes.HTML,
code: betaBadgeHtml,
},
],
text: (
<div>
Expand Down Expand Up @@ -337,10 +299,6 @@ export const BadgeExample = {
type: GuideSectionTypes.JS,
code: notificationBadgeSource,
},
{
type: GuideSectionTypes.HTML,
code: notificationBadgeHtml,
},
],
text: (
<p>
Expand Down
7 changes: 0 additions & 7 deletions src-docs/src/views/beacon/beacon_example.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';

import { renderToHtml } from '../../services';

import { GuideSectionTypes } from '../../components';

import { EuiBeacon, EuiText } from '../../../../src/components';
Expand All @@ -10,7 +8,6 @@ import { beaconConfig } from './playground';

import Beacon from './beacon';
const beaconSource = require('!!raw-loader!./beacon');
const beaconHtml = renderToHtml(Beacon);
const beaconSnippet = '<EuiBeacon />';

export const BeaconExample = {
Expand All @@ -22,10 +19,6 @@ export const BeaconExample = {
type: GuideSectionTypes.JS,
code: beaconSource,
},
{
type: GuideSectionTypes.HTML,
code: beaconHtml,
},
],
text: (
<EuiText>
Expand Down
Loading