@magmamath/students-features 0.8.0-rc.3 → 0.8.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +3 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +6 -2
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/units.types.js +0 -10
- package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -8
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +1 -0
- package/dist/commonjs/shared/translation/localization/en.json +1 -0
- package/dist/commonjs/shared/translation/localization/gb.json +1 -0
- package/dist/commonjs/shared/translation/localization/sct.json +1 -0
- package/dist/commonjs/shared/translation/localization/sw.json +3 -2
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +3 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +6 -2
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/types/units.types.js +0 -6
- package/dist/module/features/chatbot/types/units.types.js.map +1 -1
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -8
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +1 -0
- package/dist/module/shared/translation/localization/en.json +1 -0
- package/dist/module/shared/translation/localization/gb.json +1 -0
- package/dist/module/shared/translation/localization/sct.json +1 -0
- package/dist/module/shared/translation/localization/sw.json +3 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +0 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +5 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +2 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +0 -2
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +5 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +2 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +3 -1
- package/src/features/chatbot/components/Chatbot.tsx +0 -2
- package/src/features/chatbot/helpers.ts +12 -2
- package/src/features/chatbot/model/ChatBotModel.ts +1 -1
- package/src/features/chatbot/types/units.types.ts +0 -5
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +0 -4
- package/src/shared/translation/localization/ca.json +1 -0
- package/src/shared/translation/localization/en.json +1 -0
- package/src/shared/translation/localization/gb.json +1 -0
- package/src/shared/translation/localization/sct.json +1 -0
- package/src/shared/translation/localization/sw.json +3 -2
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +0 -44
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +0 -61
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/module/features/exampleSolution/components/LavaIcon.js +0 -36
- package/dist/module/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/module/features/exampleSolution/components/MessageBlock.js +0 -53
- package/dist/module/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/src/features/exampleSolution/components/LavaIcon.tsx +0 -35
- package/src/features/exampleSolution/components/MessageBlock.tsx +0 -67
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { StyleSheet } from 'react-native';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { COLORS, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
6
|
-
import { useUnit } from 'effector-react';
|
|
7
|
-
import { $localization } from "../../../shared/translation/index.js";
|
|
8
|
-
import Animated, { LinearTransition, useAnimatedStyle, withDelay, withTiming } from 'react-native-reanimated';
|
|
9
|
-
import { ExampleSolutionStatuses } from "../constants.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
export const MessageBlock = ({
|
|
12
|
-
status,
|
|
13
|
-
style
|
|
14
|
-
}) => {
|
|
15
|
-
const localization = useUnit($localization);
|
|
16
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
17
|
-
return {
|
|
18
|
-
opacity: withDelay(2000, withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, {
|
|
19
|
-
duration: 350
|
|
20
|
-
}))
|
|
21
|
-
};
|
|
22
|
-
}, [status]);
|
|
23
|
-
if (status === ExampleSolutionStatuses.CACHE) return null;
|
|
24
|
-
return /*#__PURE__*/_jsx(Animated.View, {
|
|
25
|
-
layout: LinearTransition.duration(250),
|
|
26
|
-
style: [styles.container, opacityAnimation, style],
|
|
27
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
|
28
|
-
variant: 'small',
|
|
29
|
-
numberOfLines: 1,
|
|
30
|
-
children: status === ExampleSolutionStatuses.LOADING ? localization.exampleSolution.letMeThink : localization.exampleSolution.aha
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
const styles = StyleSheet.create({
|
|
35
|
-
container: {
|
|
36
|
-
padding: SPACING[200],
|
|
37
|
-
backgroundColor: COLORS.NEUTRAL_3,
|
|
38
|
-
height: 44,
|
|
39
|
-
borderRadius: 12,
|
|
40
|
-
borderBottomRightRadius: 2,
|
|
41
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
42
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
43
|
-
shadowColor: COLORS.NEUTRAL_10,
|
|
44
|
-
shadowOffset: {
|
|
45
|
-
width: 0,
|
|
46
|
-
height: 1
|
|
47
|
-
},
|
|
48
|
-
shadowOpacity: 0.2,
|
|
49
|
-
shadowRadius: 1,
|
|
50
|
-
elevation: 3
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=MessageBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","React","COLORS","SPACING","Typography","useUnit","$localization","Animated","LinearTransition","useAnimatedStyle","withDelay","withTiming","ExampleSolutionStatuses","jsx","_jsx","MessageBlock","status","style","localization","opacityAnimation","opacity","LOADING","duration","CACHE","View","layout","styles","container","children","variant","numberOfLines","exampleSolution","letMeThink","aha","create","padding","backgroundColor","NEUTRAL_3","height","borderRadius","borderBottomRightRadius","borderWidth","hairlineWidth","borderColor","NEUTRAL_5","shadowColor","NEUTRAL_10","shadowOffset","width","shadowOpacity","shadowRadius","elevation"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/MessageBlock.tsx"],"mappings":";;AAAA,SAAoBA,UAAU,QAAmB,cAAc;AAC/D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,OAAO,EAAEC,UAAU,QAAQ,4BAA4B;AACxE,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,aAAa,QAAQ,sCAA6B;AAC3D,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,QACL,yBAAyB;AAChC,SAASC,uBAAuB,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOtD,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAyB,CAAC,KAAK;EACpE,MAAMC,YAAY,GAAGb,OAAO,CAACC,aAAa,CAAC;EAE3C,MAAMa,gBAAgB,GAAGV,gBAAgB,CAAC,MAAM;IAC9C,OAAO;MACLW,OAAO,EAAEV,SAAS,CAChB,IAAI,EACJC,UAAU,CAACK,MAAM,KAAKJ,uBAAuB,CAACS,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE;QAAEC,QAAQ,EAAE;MAAI,CAAC,CAClF;IACF,CAAC;EACH,CAAC,EAAE,CAACN,MAAM,CAAC,CAAC;EAEZ,IAAIA,MAAM,KAAKJ,uBAAuB,CAACW,KAAK,EAAE,OAAO,IAAI;EAEzD,oBACET,IAAA,CAACP,QAAQ,CAACiB,IAAI;IACZC,MAAM,EAAEjB,gBAAgB,CAACc,QAAQ,CAAC,GAAG,CAAE;IACvCL,KAAK,EAAE,CAACS,MAAM,CAACC,SAAS,EAAER,gBAAgB,EAAEF,KAAK,CAAE;IAAAW,QAAA,eAEnDd,IAAA,CAACV,UAAU;MAACyB,OAAO,EAAE,OAAQ;MAACC,aAAa,EAAE,CAAE;MAAAF,QAAA,EAC5CZ,MAAM,KAAKJ,uBAAuB,CAACS,OAAO,GACvCH,YAAY,CAACa,eAAe,CAACC,UAAU,GACvCd,YAAY,CAACa,eAAe,CAACE;IAAG,CAC1B;EAAC,CACA,CAAC;AAEpB,CAAC;AAED,MAAMP,MAAM,GAAG1B,UAAU,CAACkC,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,OAAO,EAAEhC,OAAO,CAAC,GAAG,CAAC;IACrBiC,eAAe,EAAElC,MAAM,CAACmC,SAAS;IACjCC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBC,uBAAuB,EAAE,CAAC;IAC1BC,WAAW,EAAEzC,UAAU,CAAC0C,aAAa;IACrCC,WAAW,EAAEzC,MAAM,CAAC0C,SAAS;IAE7BC,WAAW,EAAE3C,MAAM,CAAC4C,UAAU;IAC9BC,YAAY,EAAE;MACZC,KAAK,EAAE,CAAC;MACRV,MAAM,EAAE;IACV,CAAC;IACDW,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IAEfC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { ExampleSolutionStatuses } from '../constants';
|
|
4
|
-
type LavaIconProps = {
|
|
5
|
-
status: ExampleSolutionStatuses;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare const LavaIcon: ({ status, style }: LavaIconProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=LavaIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LavaIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/LavaIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAItD,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,aAAa,sBAoBxD,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ExampleSolutionStatuses } from '../constants';
|
|
4
|
-
type MessageBlockProps = {
|
|
5
|
-
status: ExampleSolutionStatuses;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare const MessageBlock: ({ status, style }: MessageBlockProps) => React.JSX.Element | null;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=MessageBlock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/MessageBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,YAAY,sBAAuB,iBAAiB,6BA0BhE,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { ExampleSolutionStatuses } from '../constants';
|
|
4
|
-
type LavaIconProps = {
|
|
5
|
-
status: ExampleSolutionStatuses;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare const LavaIcon: ({ status, style }: LavaIconProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=LavaIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LavaIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/LavaIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAItD,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,aAAa,sBAoBxD,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ExampleSolutionStatuses } from '../constants';
|
|
4
|
-
type MessageBlockProps = {
|
|
5
|
-
status: ExampleSolutionStatuses;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare const MessageBlock: ({ status, style }: MessageBlockProps) => React.JSX.Element | null;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=MessageBlock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/MessageBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,YAAY,sBAAuB,iBAAiB,6BA0BhE,CAAA"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { ExcitedLavaIcon } from '../../../shared/icons/ExcitedLavaIcon'
|
|
3
|
-
import { LavaIconInGlasses } from '../../../shared/icons'
|
|
4
|
-
import Animated, { FadeIn, useAnimatedStyle, withTiming } from 'react-native-reanimated'
|
|
5
|
-
import { StyleProp, ViewStyle } from 'react-native'
|
|
6
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
7
|
-
|
|
8
|
-
const LAVA_ICON_HEIGHT = 112
|
|
9
|
-
|
|
10
|
-
type LavaIconProps = {
|
|
11
|
-
status: ExampleSolutionStatuses
|
|
12
|
-
style?: StyleProp<ViewStyle>
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const LavaIcon = ({ status, style }: LavaIconProps) => {
|
|
16
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
17
|
-
return {
|
|
18
|
-
opacity: withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, { duration: 500 }),
|
|
19
|
-
}
|
|
20
|
-
}, [status])
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<>
|
|
24
|
-
<Animated.View style={[style, opacityAnimation]}>
|
|
25
|
-
<LavaIconInGlasses height={112} />
|
|
26
|
-
</Animated.View>
|
|
27
|
-
|
|
28
|
-
{status !== ExampleSolutionStatuses.LOADING && (
|
|
29
|
-
<Animated.View style={style} entering={FadeIn}>
|
|
30
|
-
<ExcitedLavaIcon height={LAVA_ICON_HEIGHT} />
|
|
31
|
-
</Animated.View>
|
|
32
|
-
)}
|
|
33
|
-
</>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { StyleProp, StyleSheet, ViewStyle } from 'react-native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { COLORS, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
-
import { useUnit } from 'effector-react'
|
|
5
|
-
import { $localization } from '../../../shared/translation'
|
|
6
|
-
import Animated, {
|
|
7
|
-
LinearTransition,
|
|
8
|
-
useAnimatedStyle,
|
|
9
|
-
withDelay,
|
|
10
|
-
withTiming,
|
|
11
|
-
} from 'react-native-reanimated'
|
|
12
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
13
|
-
|
|
14
|
-
type MessageBlockProps = {
|
|
15
|
-
status: ExampleSolutionStatuses
|
|
16
|
-
style?: StyleProp<ViewStyle>
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const MessageBlock = ({ status, style }: MessageBlockProps) => {
|
|
20
|
-
const localization = useUnit($localization)
|
|
21
|
-
|
|
22
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
23
|
-
return {
|
|
24
|
-
opacity: withDelay(
|
|
25
|
-
2000,
|
|
26
|
-
withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, { duration: 350 }),
|
|
27
|
-
),
|
|
28
|
-
}
|
|
29
|
-
}, [status])
|
|
30
|
-
|
|
31
|
-
if (status === ExampleSolutionStatuses.CACHE) return null
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<Animated.View
|
|
35
|
-
layout={LinearTransition.duration(250)}
|
|
36
|
-
style={[styles.container, opacityAnimation, style]}
|
|
37
|
-
>
|
|
38
|
-
<Typography variant={'small'} numberOfLines={1}>
|
|
39
|
-
{status === ExampleSolutionStatuses.LOADING
|
|
40
|
-
? localization.exampleSolution.letMeThink
|
|
41
|
-
: localization.exampleSolution.aha}
|
|
42
|
-
</Typography>
|
|
43
|
-
</Animated.View>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const styles = StyleSheet.create({
|
|
48
|
-
container: {
|
|
49
|
-
padding: SPACING[200],
|
|
50
|
-
backgroundColor: COLORS.NEUTRAL_3,
|
|
51
|
-
height: 44,
|
|
52
|
-
borderRadius: 12,
|
|
53
|
-
borderBottomRightRadius: 2,
|
|
54
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
55
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
56
|
-
|
|
57
|
-
shadowColor: COLORS.NEUTRAL_10,
|
|
58
|
-
shadowOffset: {
|
|
59
|
-
width: 0,
|
|
60
|
-
height: 1,
|
|
61
|
-
},
|
|
62
|
-
shadowOpacity: 0.2,
|
|
63
|
-
shadowRadius: 1,
|
|
64
|
-
|
|
65
|
-
elevation: 3,
|
|
66
|
-
},
|
|
67
|
-
})
|