Expo's styleguide components for use on the web.
npm install @expo/styleguideExpo's styleguide and components for use on the web.
1. Install Expo Styleguide package:
``shell`
yarn add @expo/styleguide
`
2. Import global CSS files from the package in your JS(X)/TS(X) code:
jsx`
import "@expo/styleguide/dist/expo-theme.css";
`
or import it the main stylesheet file:
css`
@import "@expo/styleguide/dist/expo-theme.css";
'./node_modules/@expo/styleguide/dist/*/.{js,ts,jsx,tsx}'
3. Add to the Tailwind content paths.
For the Styleguide we use our custom Tailwind theme, which is based on the default TW theme, with the following differences:
* only valid media screen scopes are: xs:, sm:, md:, lg: and xl:hocus:
* there is a custom scope which is a shorthand for hover and focus statesheading-[size]
* typography elements are predefined as a styles setsicon-[size]
* are custom component classes defined for icons sizing
The theme can be extended, if needed, and includes @tailwindcss/typography plugin by default, with a stripped down version of default config.
1. Install dependencies with yarn.yarn build
2. Build everything with .yarn dev
3. Develop with .
In order to see changes made to the exported tailwind.js config:
- Change a value in packages/styleguide/tailwind.js
- Run yarn build` in packages/styleguide
- Navigate to example-web and restart the dev server