Options
All
  • Public
  • Public/Protected
  • All
Menu

@assembless/react-native-material-you

Index

Type aliases

MaterialYouPalette

MaterialYouPalette: { system_accent1: string[]; system_accent2: string[]; system_accent3: string[]; system_neutral1: string[]; system_neutral2: string[] }

Type declaration

Other Functions

Const MaterialYouService

  • MaterialYouService(__namedParameters: { children: ReactNode }): Element
  • React Context Provider for the Material You API.

    • Makes sure Material You is supported on the device.
    • Subscribes to palette regeneration.

    Parameters

    • __namedParameters: { children: ReactNode }
      • children: ReactNode

    Returns Element

Const deviceSupportsMaterialYou

  • deviceSupportsMaterialYou(): any
  • Returns true, if the device is running Android 12/has the generated color palette.

    Returns any

Const getPalette

  • getPalette(): Promise<any>
  • Returns a promise with Material You palette generated from the devices wallpaper.

    Returns Promise<any>

Const getPaletteSync

Const useMaterialYouPalette

Const useMaterialYouService

  • useMaterialYouService(): MaterialYouState
  • A hook that returns the current context.

    Returns MaterialYouState

React Functions

Const useMaterialYou

  • useMaterialYou(): State
  • Hook to get the generated Material You colors.

    Returns State

Generated using TypeDoc