Skip to content

Commit

Permalink
feat(v2): support non-css modules when loading styles (facebook#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshun authored Oct 26, 2018
1 parent 13b23ed commit c733646
Show file tree
Hide file tree
Showing 24 changed files with 439 additions and 430 deletions.
2 changes: 1 addition & 1 deletion v2/lib/theme/BlogPost/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Helmet from 'react-helmet';
import classnames from 'classnames';
import Layout from '@theme/Layout'; // eslint-disable-line

import styles from './styles.css';
import styles from './styles.module.css';
export default class BlogPost extends React.Component {
renderPostHeader() {
const {metadata, siteConfig} = this.props;
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions v2/lib/theme/Doc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Footer from '@theme/Footer'; // eslint-disable-line
import Navbar from '@theme/Navbar'; // eslint-disable-line
import Sidebar from '@theme/Sidebar'; // eslint-disable-line

import styles from './styles.css';
import styles from './styles.module.css';

class Doc extends React.Component {
render() {
Expand All @@ -36,7 +36,6 @@ class Doc extends React.Component {
{language && <html lang={language} />}
{language && <meta name="docsearch:language" content={language} />}
{version && <meta name="docsearch:version" content={version} />}
<link rel="stylesheet" type="text/css" href="/css/main.css" />
</Helmet>
<Navbar docsMetadatas={docsMetadatas} />
<Sidebar
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion v2/lib/theme/DocsPaginator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import {Link} from 'react-router-dom';

import styles from './styles.css';
import styles from './styles.module.css';

export default class DocsPaginator extends React.Component {
render() {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion v2/lib/theme/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import {Link} from 'react-router-dom';

import styles from './styles.css';
import styles from './styles.module.css';

function Footer(props) {
return (
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions v2/lib/theme/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import React from 'react';
import Helmet from 'react-helmet';

import Footer from '@theme/Footer'; // eslint-disable-line
import Navbar from '@theme/Navbar'; // eslint-disable-line
Expand All @@ -24,9 +23,6 @@ export default class Layout extends React.Component {
} = this.props;
return (
<div>
<Helmet>
<link rel="stylesheet" type="text/css" href="/css/main.css" />
</Helmet>
<Navbar docsMetadatas={docsMetadatas} />
{children}
<Footer
Expand Down
Loading

0 comments on commit c733646

Please sign in to comment.