Skip to main content

Shared Package & Styling

Shared Package (@enaccess/shared)

The packages/shared/ workspace package provides:

ExportTypeDescription
PlacetypePlace data shape (id, name, lat, lng, ratings, ACS attrs, badges)
AppRoutertypetRPC router type for full client type safety
BadgeInfotypeBadge display info (label, bgColor, textColor)
StarLayouttypeStar rating layout (fullStars, partialFill, emptyStars)
COLORSconstantBrand colors, ACS colors, badge colors
getBadges()utilityCompute badge list from place flags
parsePlace()utilityParse raw API response into typed Place object
calculateStarLayout()utilityCompute star fill layout from numeric rating

Styling

  • NativeWind 4.x — Tailwind CSS utility classes in React Native via className prop
  • Custom Colorsconstants/Colors.ts defines brand colors, badge colors, ACS colors, marker colors, and full light/dark theme palettes
  • Dark mode — Supported via useColorScheme hook; navigation themes (EnAccessLightTheme / EnAccessDarkTheme) configured in root layout

Component Tree