GlobalStyles

GlobalStyles is a component that set the common style, and also resets browser styles.

Import

import { GlobalStyles } from '@contentful/f36-components';
// or
import { GlobalStyles } from '@contentful/f36-core';

Examples

To use the GlobalStyles just add it to the render of the app.

import ReactDOM from 'react-dom';
import { GlobalStyles } from '@contentful/f36-components';
import App from './App';
const rootElement = document.getElementById('root');
ReactDOM.render(
<>
<GlobalStyles />
<App />
</>,
rootElement,
);

Props (API reference)

Name

Type

Default

styles
SerializedStyles

Extend global styles

withNormalize
false
true

Determines if CSS reset should be used

true