@airbnb/lunar
v3.29.0
Published
React toolkit and design language for Airbnb open source and internal projects.
Downloads
2,755
Keywords
Readme
Lunar
Provides core React building blocks that all other consuming packages are built around. This includes components, composers, themes, and more.
yarn add @airbnb/lunar
Setup
Initialize the core package to apply globalization and theme-related settings.
import Core from '@airbnb/lunar';
Core.initialize({
defaultLocale: 'en',
defaultTimezone: 'UTC',
logger: logToSentry,
name: 'AppName',
});
If
defaultLocale
anddefaultTimezone
are omitted, their values will be automatically detected from the user's browser settings.
You should call
Core.initialize()
before importing any component that leverageswithStyles
oruseStyles
for theme-related settings to take effect.