1.1.0 • Published 4 years ago

muy v1.1.0

Weekly downloads
10
License
ISC
Repository
github
Last release
4 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

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

0.20.0-alpha.0

4 years ago

0.19.4

4 years ago

0.19.5

4 years ago

0.19.3

4 years ago

0.19.1

4 years ago

0.19.2

4 years ago

0.19.0

4 years ago

0.18.0

4 years ago

0.17.6

4 years ago

0.17.7

4 years ago

0.17.5

4 years ago

0.17.4

4 years ago

0.17.2

4 years ago

0.17.3

4 years ago

0.17.0

4 years ago

0.17.1

4 years ago

0.16.0

4 years ago

0.15.5

4 years ago

0.15.4

4 years ago

0.15.0

4 years ago

0.15.3

4 years ago

0.14.0

4 years ago

0.11.0

4 years ago

0.13.0

4 years ago

0.13.1

4 years ago

0.13.2

4 years ago

0.13.3

4 years ago

0.9.0

4 years ago

0.10.1

4 years ago

0.12.0

4 years ago

0.10.0

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.11

4 years ago

0.5.10

4 years ago

0.5.8

4 years ago

0.5.9

4 years ago

0.5.7

4 years ago

0.5.6

4 years ago

0.5.5

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.3.0

4 years ago

0.3.5

4 years ago

0.2.6

4 years ago

0.4.1

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.4.3

4 years ago

0.3.4

4 years ago

0.4.2

4 years ago

0.3.3

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago