This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| button.onEvent = { event in | |
| guard let eventData = event?.data(using: .utf8, allowLossyConversion: false), | |
| let eventJson = try? JSONSerialization.jsonObject(with: eventData, options: .mutableContainers), | |
| let eventDict = eventJson as? [String: Any], | |
| let eventName = eventDict["name"] as? String, | |
| let eventText = eventDict["text"] as? String | |
| else { | |
| return | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { FC, memo } from "react"; | |
| import { text, background, gradient, body1, headline2 } from '@sberdevices/plasma-tokens'; | |
| import { sberBox, sberPortal, touch } from '@sberdevices/plasma-tokens/typo'; | |
| import styled, { createGlobalStyle } from 'styled-components'; | |
| import { detectDevice } from '@sberdevices/ui/utils'; | |
| const TypoScaleSberBox = createGlobalStyle(sberBox); | |
| const TypoScaleSberPortal = createGlobalStyle(sberPortal); | |
| const TypoScaleTouch = createGlobalStyle(touch); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { FC, memo, useRef, useEffect, useState } from "react"; | |
| import { createSmartappDebugger, createAssistant, AssistantAppState, AssistantCharacterType } from "@sberdevices/assistant-client"; | |
| import { darkJoy, darkEva, darkSber } from '@sberdevices/plasma-tokens/themes'; | |
| import { text, background, gradient } from '@sberdevices/plasma-tokens'; | |
| import { createGlobalStyle } from 'styled-components'; | |
| import './App.css'; | |
| const ThemeBackgroundEva = createGlobalStyle(darkEva); | |
| const ThemeBackgroundSber = createGlobalStyle(darkSber); |