1.1.0 • Published 5 years ago

muy v1.1.0

Weekly downloads
10
License
ISC
Repository
github
Last release
5 years ago

muy

Build websites & apps with Gatsby & Material UI. Pronounced /ˈɛmˈjuːˈwaɪ/

Install

npm install muy @material-ui/core

Add support to server-side rendering

On your Terminal, run:

npm install gatsby-plugin-material-ui @material-ui/styles

Add the following to your gatsby-config.js file:

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-material-ui'
    }
  ]
}

The default options should be enough to cover the most common use cases.

For custom and advanced examples, please check gatsby-plugin-material-ui on Gatsby

Usage

Importing/requiring components

ES6 way

import React from 'react'
import { H1 } from 'muy'

// ...

const YourComponent = () => <H1 />

RequireJS way

const React = require('react')
const { H1 } = require('muy')

// ...

const YourComponent = () => <H1 />

Customizing Markdown & MDX Components

With useMDXComponents(), you can replace every HTML element that Markdown renders with Muy and Material UI implementation.

import React from "react"
import { MDXProvider } from "@mdx-js/react"
import { useMDXComponents } from "muy"

export default function Layout({ children }) {
  const components = useMDXComponents()
  return (
    <MDXProvider components={components}>
      {children}
    </MDXProvider>
  )
}

Don't forget to install all dependencies:

npm install gatsby-plugin-mdx @mdx-js/mdx @mdx-js/react

And update your gatsby-config.js to use gatsby-plugin-mdx:

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-mdx'
    }
  ]
}

For more info, check Getting Started with MDX on Gatsby website

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

0.20.0-alpha.0

5 years ago

0.19.4

5 years ago

0.19.5

5 years ago

0.19.3

5 years ago

0.19.1

5 years ago

0.19.2

5 years ago

0.19.0

5 years ago

0.18.0

5 years ago

0.17.6

5 years ago

0.17.7

5 years ago

0.17.5

5 years ago

0.17.4

5 years ago

0.17.2

5 years ago

0.17.3

5 years ago

0.17.0

5 years ago

0.17.1

5 years ago

0.16.0

5 years ago

0.15.5

5 years ago

0.15.4

5 years ago

0.15.0

5 years ago

0.15.3

5 years ago

0.14.0

5 years ago

0.11.0

5 years ago

0.13.0

5 years ago

0.13.1

5 years ago

0.13.2

5 years ago

0.13.3

5 years ago

0.9.0

5 years ago

0.10.1

5 years ago

0.12.0

5 years ago

0.10.0

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.11

5 years ago

0.5.10

5 years ago

0.5.8

5 years ago

0.5.9

5 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.3.0

5 years ago

0.3.5

5 years ago

0.2.6

5 years ago

0.4.1

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.4.3

5 years ago

0.3.4

5 years ago

0.4.2

5 years ago

0.3.3

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago