Skip to content

v0.15.0

Compare
Choose a tag to compare
@hasparus hasparus released this 26 Sep 13:41

🎉 This release contains work from new contributors! 🎉

Thanks for all your work!

❤️ Luke Watts (@thisislawatts)

❤️ Valto Savi (@pointlessrapunzel)

❤️ Brage Sekse Aarset (@braaar)

Release Notes

Pull out MDX to be opt-in (#2288)

Breaking: theme-ui no longer includes @theme-ui/mdx — MDX is now opt-in.

If your project is not using MDX or importing Themed, you shouldn't need to
change anything.

  • MDXProvider is no longer included in Theme UI ThemeProvider, and has been
    removed in favour of an useThemedStylesWithMdx hook.

    • Migration: Use useThemedStylesWithMdx together with MDXProvider and useMDXComponents from @mdx-js/react.

      import {
        MDXProvider,
        useMDXComponents,
        Components as MDXComponents,
        MergeComponents as MergeMDXComponents,
      } from '@mdx-js/react'
      import { useThemedStylesWithMdx } from '@theme-ui/mdx'
      import { ThemeProvider, Theme } from 'theme-ui'
      
      interface MyProviderProps {
        theme: Theme
        components?: MDXComponents | MergeMDXComponents
        children: React.ReactNode
      }
      function MyProvider({ theme, components, children }: MyProviderProps) {
        const componentsWithStyles = useThemedStylesWithMdx(useMDXComponents(components))
      
        return (
          <ThemeProvider theme={theme}>
            <MDXProvider components={componentsWithStyles}>
              {children}
            </MDXProvider>
          </ThemeProvider>
        )
      }
  • Themed components dict and other exports from @theme-ui/mdx are no longer reexported from theme-ui.

    • Migration: Import it from @theme-ui/mdx instead.

      -  import { Themed } from 'theme-ui'
      +  import { Themed } from '@theme-ui/mdx'

Remove @theme-ui/editor (#2292)

  • Breaking: @theme-ui/editor was removed. Use CSS GUI instead.

Drop support for React 16 + 17 (#2215)

Theme UI 0.15.0 drops support for React 16 and React 17. Your use case may still work, but we don't guarantee it.

@theme-ui/components: Increased right padding in Select component (#2058)

Select component default paddingRight style has increased to spaces[4] (32px by default), to avoid text flowing behind the chevron icon.


🚀 Enhancement

🐛 Bug Fix

🏠 Internal

Authors: 8