Package Exports
- @remirror/ui
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@remirror/ui) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@remirror/ui
This library is the base for all the UI (user interface) components and styles within Remirror. It uses @emotion/core and @styled-system/css, but was inspired by theme-ui.
Installation
yarn add @remirror/ui @remirror/core @remirror/reactUsage
Firstly, create the theme or use a custom theme preset.
sx
The sx utility comes from the [@styled-system/css][styled-system/css] package and is intended for use with the Emotion css prop.
It will attempt to use values from the theme object for many common CSS properties, and will fall back to raw values when there is no corresponding theme value.
To see a list of supported CSS properties, see the Styled System CSS docs.
sx(styleObject)(theme);Usage:
/** @jsx jsx */
import { jsx } from '@emotion/core';
<div css={sx(styles)} />;| Argument | Type | Description |
|---|---|---|
styleObject |
Object | a theme-aware style object with support for responsive array values and Styled System prop shortcuts |
theme |
Object | the Emotion theming context object |