Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Add tags to embed snippets in docs (#1123)
Browse files Browse the repository at this point in the history
* Add tags to basic page

* Add tags for doc embedding
  • Loading branch information
dominicbetts authored and isaac-dasan committed Oct 10, 2018
1 parent 46bcd14 commit f1385c4
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Copyright (c) Microsoft. All rights reserved.
// <container>

import { translate } from 'react-i18next';

import { BasicPage } from './basicPage';

export const BasicPageContainer = translate()(BasicPage);

// </container>
3 changes: 3 additions & 0 deletions src/walkthrough/components/pages/basicPage/basicPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

// <page>
import React, { Component } from 'react';

import { PageContent } from 'components/shared';
Expand All @@ -16,3 +17,5 @@ export class BasicPage extends Component {
);
}
}

// </page>
2 changes: 2 additions & 0 deletions src/walkthrough/components/pages/basicPage/basicPage.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.

// <styles>
@import 'src/styles/variables';
@import 'src/styles/mixins';
@import 'src/styles/themes';

.basic-page-container { padding: $baseContentPadding; }
// </styles>
3 changes: 3 additions & 0 deletions src/walkthrough/components/pages/basicPage/basicPage.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

// <test>
import React from 'react';
import { shallow } from 'enzyme';
import 'polyfills';
Expand All @@ -18,3 +19,5 @@ describe('BasicPage Component', () => {
);
});
});

// </test>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

// <panel>
import React, { Component } from 'react';

import {
Expand Down Expand Up @@ -33,3 +34,4 @@ export class ExamplePanel extends Component {
);
}
}
// </panel>
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Copyright (c) Microsoft. All rights reserved.

// <flyoutcontainer>
import { translate } from 'react-i18next';

import { ExampleFlyout } from './exampleFlyout';

export const ExampleFlyoutContainer = translate()(ExampleFlyout);

// </flyoutcontainer>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

// <flyout>
import React, { Component } from 'react';

import { ExampleService } from 'walkthrough/services';
Expand Down Expand Up @@ -140,3 +141,4 @@ export class ExampleFlyout extends Component {
);
}
}
// </flyout>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.

// <grid>

import React, { Component } from 'react';
import { Btn, PcsGrid } from 'components/shared';
import { exampleColumnDefs, defaultExampleGridProps } from './exampleGridConfig';
Expand Down Expand Up @@ -122,3 +124,4 @@ export class ExampleGrid extends Component {
);
}
}
// </grid>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.

// <gridconfig>

import Config from 'app.config';
import { SoftSelectLinkRenderer } from 'components/shared/cellRenderers';

Expand Down Expand Up @@ -28,3 +30,5 @@ export const defaultExampleGridProps = {
paginationPageSize: Config.paginationPageSize,
rowSelection: 'multiple'
};

// </gridconfig>
3 changes: 3 additions & 0 deletions src/walkthrough/services/exampleService.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.

// <service>

import { Observable } from 'rxjs';
import { toExampleItemModel, toExampleItemsModel } from './models';

Expand Down Expand Up @@ -43,3 +45,4 @@ export class ExampleService {
return this.getExampleItems().delay(2000);
}
}
// </service>
3 changes: 3 additions & 0 deletions src/walkthrough/services/models/exampleModels.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

// <models>
import { camelCaseReshape, getItems } from 'utilities';

/**
Expand All @@ -15,3 +16,5 @@ export const toExampleItemModel = (data = {}) => camelCaseReshape(data, {

export const toExampleItemsModel = (response = {}) => getItems(response)
.map(toExampleItemModel);

// </models>
3 changes: 3 additions & 0 deletions src/walkthrough/store/reducers/exampleReducer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

// <reducer>
import 'rxjs';
import { Observable } from 'rxjs';
import moment from 'moment';
Expand Down Expand Up @@ -81,3 +82,5 @@ export const getExamples = createSelector(
(entities, items) => items.map(id => entities[id])
);
// ========================= Selectors - END

// </reducer>

0 comments on commit f1385c4

Please sign in to comment.