Package Exports
- @sanity/base
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 (@sanity/base) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
base
Sanity plugin containing the base components and roles for a Sanity configuration
Internationalization?
import React from 'react'
import MyComponent from 'path-to-component'
import SanityIntlProvider from 'part:@sanity/base/sanity-intl-provider'
import {FormattedMessage} from 'part:@sanity/base/locale/intl'
export default class i18nExample extends React.Component {
render() {
return (
<SanityIntlProvider supportedLanguages={['en-US']}>
<MyComponent>
<FormattedMessage
id={`schema.${type.name}.${field.name}`}
description="Some description"
defaultMessage="some message"
/>
</MyComponent>
</SanityIntlProvider>
)
}
}