@magmamath/students-features 0.6.0-rc.0 → 0.6.0
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/endOfAssignment/components/Modal/assets/SunrisingIcon.js +77 -5
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +5 -5
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -1
- package/dist/commonjs/features/problemSelector/components/ProblemSelector.js +43 -0
- package/dist/commonjs/features/problemSelector/components/ProblemSelector.js.map +1 -0
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js +69 -0
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js.map +1 -0
- package/dist/commonjs/features/problemSelector/constants.js +84 -0
- package/dist/commonjs/features/problemSelector/constants.js.map +1 -0
- package/dist/commonjs/features/problemSelector/index.js +20 -0
- package/dist/commonjs/features/problemSelector/index.js.map +1 -0
- package/dist/commonjs/features/problemSelector/types.js +6 -0
- package/dist/commonjs/features/problemSelector/types.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/LockIcon.js +31 -0
- package/dist/commonjs/shared/icons/LockIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +77 -5
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +5 -5
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -1
- package/dist/module/features/problemSelector/components/ProblemSelector.js +36 -0
- package/dist/module/features/problemSelector/components/ProblemSelector.js.map +1 -0
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js +63 -0
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js.map +1 -0
- package/dist/module/features/problemSelector/constants.js +80 -0
- package/dist/module/features/problemSelector/constants.js.map +1 -0
- package/dist/module/features/problemSelector/index.js +5 -0
- package/dist/module/features/problemSelector/index.js.map +1 -0
- package/dist/module/features/problemSelector/types.js +4 -0
- package/dist/module/features/problemSelector/types.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/LockIcon.js +23 -0
- package/dist/module/shared/icons/LockIcon.js.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelector.d.ts +8 -0
- package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelector.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelectorButton.d.ts +4 -0
- package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts +23 -0
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/problemSelector/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/problemSelector/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/problemSelector/types.d.ts +11 -0
- package/dist/typescript/commonjs/features/problemSelector/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -1
- package/dist/typescript/module/features/problemSelector/components/ProblemSelector.d.ts +8 -0
- package/dist/typescript/module/features/problemSelector/components/ProblemSelector.d.ts.map +1 -0
- package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts +4 -0
- package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -0
- package/dist/typescript/module/features/problemSelector/constants.d.ts +23 -0
- package/dist/typescript/module/features/problemSelector/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/problemSelector/index.d.ts +4 -0
- package/dist/typescript/module/features/problemSelector/index.d.ts.map +1 -0
- package/dist/typescript/module/features/problemSelector/types.d.ts +11 -0
- package/dist/typescript/module/features/problemSelector/types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/LockIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/LockIcon.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +26 -4
- package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +3 -4
- package/src/features/problemSelector/components/ProblemSelector.tsx +37 -0
- package/src/features/problemSelector/components/ProblemSelectorButton.tsx +81 -0
- package/src/features/problemSelector/constants.ts +106 -0
- package/src/features/problemSelector/index.ts +3 -0
- package/src/features/problemSelector/types.ts +13 -0
- package/src/index.ts +1 -0
- package/src/shared/icons/LockIcon.tsx +16 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/LockIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,eAAO,MAAM,QAAQ,6BAA2D,SAAS,sBASxF,CAAA"}
|
package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconProps } from '../../../../../shared/icons/icon.types';
|
|
3
|
-
export declare const SunrisingIcon: (
|
|
3
|
+
export declare const SunrisingIcon: ({ size }: IconProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=SunrisingIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SunrisingIcon.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAElE,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"SunrisingIcon.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAElE,eAAO,MAAM,aAAa,aAAoB,SAAS,sBAqNtD,CAAA"}
|
package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconProps } from '../../../../../shared/icons/icon.types';
|
|
3
|
-
export declare const TrophyIcon: (
|
|
3
|
+
export declare const TrophyIcon: ({ size }: IconProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=TrophyIcon.d.ts.map
|
package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrophyIcon.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TrophyIcon.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAElE,eAAO,MAAM,UAAU,aAAoB,SAAS,sBAuDnD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProblemSelectorButtonProps } from '../types';
|
|
3
|
+
type ProblemSelectorProps = {
|
|
4
|
+
buttons: ProblemSelectorButtonProps[];
|
|
5
|
+
};
|
|
6
|
+
export declare const ProblemSelector: ({ buttons }: ProblemSelectorProps) => React.JSX.Element | null;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ProblemSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProblemSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/features/problemSelector/components/ProblemSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAErD,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,0BAA0B,EAAE,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,eAAe,gBAAiB,oBAAoB,6BAYhE,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProblemSelectorButtonProps } from '../types';
|
|
3
|
+
export declare const ProblemSelectorButton: ({ text, state, onClick, badgeValue, locked, }: ProblemSelectorButtonProps) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=ProblemSelectorButton.d.ts.map
|
package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProblemSelectorButton.d.ts","sourceRoot":"","sources":["../../../../../../src/features/problemSelector/components/ProblemSelectorButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAezB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAErD,eAAO,MAAM,qBAAqB,kDAM/B,0BAA0B,sBA+C5B,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ButtonColorPreset } from '@magmamath/react-native-ui';
|
|
2
|
+
import { ProblemSelectorButtonState } from './types';
|
|
3
|
+
export declare const BUTTON_SIZE = 49.5;
|
|
4
|
+
export declare const BADGE_COORDINATES: {
|
|
5
|
+
top: number;
|
|
6
|
+
right: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const ICON_SIZE: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const PROBLEM_SELECTOR_CONTENT_WIDTH = 265;
|
|
13
|
+
export declare const PROBLEM_SELECTOR_BUTTON_STATE: {
|
|
14
|
+
readonly SELECTED: "selected";
|
|
15
|
+
readonly SELECTED_EXAM: "selected-exam";
|
|
16
|
+
readonly SOLVED: "solved";
|
|
17
|
+
readonly SOLVED_FIRST_ATTEMPT: "solved-first-attempt";
|
|
18
|
+
readonly NOT_SOLVED: "not-solved";
|
|
19
|
+
readonly MISTAKE: "mistake";
|
|
20
|
+
readonly EXAM: "exam";
|
|
21
|
+
};
|
|
22
|
+
export declare const COLOR_SCHEME_MAP: Record<ProblemSelectorButtonState, ButtonColorPreset>;
|
|
23
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/problemSelector/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,4BAA4B,CAAA;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAEpD,eAAO,MAAM,WAAW,OAAO,CAAA;AAC/B,eAAO,MAAM,iBAAiB;;;CAAuB,CAAA;AACrD,eAAO,MAAM,SAAS;;;CAA4B,CAAA;AAClD,eAAO,MAAM,8BAA8B,MAAM,CAAA;AAEjD,eAAO,MAAM,6BAA6B;;;;;;;;CAQhC,CAAA;AASV,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,0BAA0B,EAAE,iBAAiB,CAgFlF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/problemSelector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAC3D,YAAY,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PROBLEM_SELECTOR_BUTTON_STATE } from './constants';
|
|
2
|
+
export type ProblemSelectorButtonState = (typeof PROBLEM_SELECTOR_BUTTON_STATE)[keyof typeof PROBLEM_SELECTOR_BUTTON_STATE];
|
|
3
|
+
export type ProblemSelectorButtonProps = {
|
|
4
|
+
key: string;
|
|
5
|
+
text: string;
|
|
6
|
+
state: ProblemSelectorButtonState;
|
|
7
|
+
locked: boolean;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
badgeValue?: number;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/problemSelector/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAE3D,MAAM,MAAM,0BAA0B,GACpC,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,OAAO,6BAA6B,CAAC,CAAA;AAEpF,MAAM,MAAM,0BAA0B,GAAG;IACvC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,0BAA0B,CAAA;IACjC,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/LockIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,eAAO,MAAM,QAAQ,6BAA2D,SAAS,sBASxF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "0.6.0
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react-native-svg": "^15.10.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@magmamath/react-native-ui": "0.4.
|
|
32
|
+
"@magmamath/react-native-ui": "0.4.17",
|
|
33
33
|
"@react-native/eslint-config": "^0.73.1",
|
|
34
34
|
"@release-it/conventional-changelog": "^9.0.2",
|
|
35
35
|
"@types/jest": "^29.5.5",
|
|
@@ -2,11 +2,9 @@ import * as React from 'react'
|
|
|
2
2
|
import Svg, { G, Path, Defs, LinearGradient, Stop } from 'react-native-svg'
|
|
3
3
|
import { IconProps } from '../../../../../shared/icons/icon.types'
|
|
4
4
|
|
|
5
|
-
export const SunrisingIcon = (
|
|
6
|
-
const height = (props.size ?? 0) * 0.606
|
|
7
|
-
|
|
5
|
+
export const SunrisingIcon = ({ size = 909 }: IconProps) => {
|
|
8
6
|
return (
|
|
9
|
-
<Svg width={
|
|
7
|
+
<Svg width={size} height={size * 0.606} viewBox="0 0 909 551" fill="none">
|
|
10
8
|
<G opacity={0.1}>
|
|
11
9
|
<Path
|
|
12
10
|
d="M164.04-598.854a893.984 893.984 0 01222.319 28.085L164.04 295.106v-893.96z"
|
|
@@ -68,6 +66,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
68
66
|
>
|
|
69
67
|
<Stop stopColor="#FF245F" />
|
|
70
68
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
69
|
+
<Stop stopColor="#FF245F" />
|
|
70
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
71
71
|
</LinearGradient>
|
|
72
72
|
<LinearGradient
|
|
73
73
|
id="paint1_linear_3505_1308"
|
|
@@ -79,6 +79,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
79
79
|
>
|
|
80
80
|
<Stop stopColor="#FF245F" />
|
|
81
81
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
82
|
+
<Stop stopColor="#FF245F" />
|
|
83
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
82
84
|
</LinearGradient>
|
|
83
85
|
<LinearGradient
|
|
84
86
|
id="paint2_linear_3505_1308"
|
|
@@ -90,6 +92,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
90
92
|
>
|
|
91
93
|
<Stop stopColor="#FF245F" />
|
|
92
94
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
95
|
+
<Stop stopColor="#FF245F" />
|
|
96
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
93
97
|
</LinearGradient>
|
|
94
98
|
<LinearGradient
|
|
95
99
|
id="paint3_linear_3505_1308"
|
|
@@ -101,6 +105,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
101
105
|
>
|
|
102
106
|
<Stop stopColor="#FF245F" />
|
|
103
107
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
108
|
+
<Stop stopColor="#FF245F" />
|
|
109
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
104
110
|
</LinearGradient>
|
|
105
111
|
<LinearGradient
|
|
106
112
|
id="paint4_linear_3505_1308"
|
|
@@ -112,6 +118,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
112
118
|
>
|
|
113
119
|
<Stop stopColor="#FF245F" />
|
|
114
120
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
121
|
+
<Stop stopColor="#FF245F" />
|
|
122
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
115
123
|
</LinearGradient>
|
|
116
124
|
<LinearGradient
|
|
117
125
|
id="paint5_linear_3505_1308"
|
|
@@ -123,6 +131,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
123
131
|
>
|
|
124
132
|
<Stop stopColor="#FF245F" />
|
|
125
133
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
134
|
+
<Stop stopColor="#FF245F" />
|
|
135
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
126
136
|
</LinearGradient>
|
|
127
137
|
<LinearGradient
|
|
128
138
|
id="paint6_linear_3505_1308"
|
|
@@ -134,6 +144,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
134
144
|
>
|
|
135
145
|
<Stop stopColor="#FF245F" />
|
|
136
146
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
147
|
+
<Stop stopColor="#FF245F" />
|
|
148
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
137
149
|
</LinearGradient>
|
|
138
150
|
<LinearGradient
|
|
139
151
|
id="paint7_linear_3505_1308"
|
|
@@ -145,6 +157,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
145
157
|
>
|
|
146
158
|
<Stop stopColor="#FF245F" />
|
|
147
159
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
160
|
+
<Stop stopColor="#FF245F" />
|
|
161
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
148
162
|
</LinearGradient>
|
|
149
163
|
<LinearGradient
|
|
150
164
|
id="paint8_linear_3505_1308"
|
|
@@ -156,6 +170,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
156
170
|
>
|
|
157
171
|
<Stop stopColor="#FF245F" />
|
|
158
172
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
173
|
+
<Stop stopColor="#FF245F" />
|
|
174
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
159
175
|
</LinearGradient>
|
|
160
176
|
<LinearGradient
|
|
161
177
|
id="paint9_linear_3505_1308"
|
|
@@ -167,6 +183,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
167
183
|
>
|
|
168
184
|
<Stop stopColor="#FF245F" />
|
|
169
185
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
186
|
+
<Stop stopColor="#FF245F" />
|
|
187
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
170
188
|
</LinearGradient>
|
|
171
189
|
<LinearGradient
|
|
172
190
|
id="paint10_linear_3505_1308"
|
|
@@ -178,6 +196,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
178
196
|
>
|
|
179
197
|
<Stop stopColor="#FF245F" />
|
|
180
198
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
199
|
+
<Stop stopColor="#FF245F" />
|
|
200
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
181
201
|
</LinearGradient>
|
|
182
202
|
<LinearGradient
|
|
183
203
|
id="paint11_linear_3505_1308"
|
|
@@ -189,6 +209,8 @@ export const SunrisingIcon = (props: IconProps) => {
|
|
|
189
209
|
>
|
|
190
210
|
<Stop stopColor="#FF245F" />
|
|
191
211
|
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
212
|
+
<Stop stopColor="#FF245F" />
|
|
213
|
+
<Stop offset={1} stopColor="#FF7917" stopOpacity={0} />
|
|
192
214
|
</LinearGradient>
|
|
193
215
|
</Defs>
|
|
194
216
|
</Svg>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import Svg, { Path } from 'react-native-svg'
|
|
3
|
-
import { IconProps } from '../../../../../shared/icons/icon.types'
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
const height = (props.size ?? 0) * 0.982
|
|
4
|
+
import { IconProps } from '../../../../../shared/icons/icon.types'
|
|
7
5
|
|
|
6
|
+
export const TrophyIcon = ({ size = 466 }: IconProps) => {
|
|
8
7
|
return (
|
|
9
|
-
<Svg width={
|
|
8
|
+
<Svg width={size} height={size * 0.982} viewBox="0 0 466 458" fill="none">
|
|
10
9
|
<Path
|
|
11
10
|
d="M258.454 244.45l-5.731 32.767 16.384 2.86c8.047 1.407 15.796 2.106 23.222 2.106 15.697.011 29.985-3.137 42.766-9.389 6.728-3.292 13.025-7.438 18.9-12.449 44.672-38.12 50.247-115.859 49.604-158.813-.288-18.467-9.466-35.848-24.575-46.49-9.355-6.606-20.23-10.209-31.348-10.575a57.996 57.996 0 00-17.935 2.206c-14.355 4.09-26.36 13.38-33.875 25.994l-32.379-14.332L250.03 88.75l39.162 17.326c6.274 2.771 13.247 2.916 19.632.388 6.374-2.516 11.373-7.382 14.055-13.7a24.56 24.56 0 0115.974-14.112c2.993-.853 6.052-1.13 9.056-.853a24.578 24.578 0 0111.961 4.422c6.44 4.534 10.353 11.95 10.475 19.82 1.164 76.841-18.822 112.224-32.024 127.144-2.195 2.494-4.213 4.412-5.909 5.864-14.632 12.47-33.465 16.483-57.586 12.271l-16.372-2.871zM37.623 282.187c7.429 0 15.173-.703 23.223-2.111l16.379-2.864-5.73-32.757-16.378 2.865c-24.126 4.221-42.953.202-57.575-12.274-11.858-10.119-39.295-43.336-37.936-133.006.119-7.871 4.036-15.28 10.476-19.82a24.601 24.601 0 0121.015-3.57A24.606 24.606 0 017.075 92.764c2.683 6.318 7.675 11.186 14.058 13.709 6.384 2.522 13.355 2.38 19.63-.396l39.152-17.329-13.46-30.41-32.37 14.328C26.57 60.055 14.57 50.762.213 46.67c-16.936-4.828-34.901-1.777-49.293 8.369-15.102 10.647-24.286 28.03-24.565 46.498-.652 42.947 4.926 120.686 49.6 158.806 17.036 14.535 37.71 21.844 61.668 21.844z"
|
|
12
11
|
fill="#FFD690"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
import { ProblemSelectorButton } from './ProblemSelectorButton'
|
|
6
|
+
|
|
7
|
+
import { PROBLEM_SELECTOR_CONTENT_WIDTH } from '../constants'
|
|
8
|
+
import { ProblemSelectorButtonProps } from '../types'
|
|
9
|
+
|
|
10
|
+
type ProblemSelectorProps = {
|
|
11
|
+
buttons: ProblemSelectorButtonProps[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ProblemSelector = ({ buttons }: ProblemSelectorProps) => {
|
|
15
|
+
if (!buttons.length) return null
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<View style={styles.container}>
|
|
19
|
+
<View style={styles.contentContainer}>
|
|
20
|
+
{buttons.map((btn) => (
|
|
21
|
+
<ProblemSelectorButton {...btn} key={btn.key} />
|
|
22
|
+
))}
|
|
23
|
+
</View>
|
|
24
|
+
</View>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const styles = StyleSheet.create({
|
|
29
|
+
container: { alignItems: 'center' },
|
|
30
|
+
contentContainer: {
|
|
31
|
+
width: PROBLEM_SELECTOR_CONTENT_WIDTH,
|
|
32
|
+
flexWrap: 'wrap',
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
paddingVertical: SPACING[400],
|
|
35
|
+
gap: 15,
|
|
36
|
+
},
|
|
37
|
+
})
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
|
|
4
|
+
import { UnreadMessagesBadge } from '@magmamath/students-features'
|
|
5
|
+
import {
|
|
6
|
+
Button,
|
|
7
|
+
ButtonSize,
|
|
8
|
+
ButtonStates,
|
|
9
|
+
ButtonVariant,
|
|
10
|
+
Typography,
|
|
11
|
+
} from '@magmamath/react-native-ui'
|
|
12
|
+
|
|
13
|
+
import { BADGE_COORDINATES, BUTTON_SIZE, COLOR_SCHEME_MAP, ICON_SIZE } from '../constants'
|
|
14
|
+
import { LockIcon } from '../../../shared/icons/LockIcon'
|
|
15
|
+
|
|
16
|
+
import { ProblemSelectorButtonProps } from '../types'
|
|
17
|
+
|
|
18
|
+
export const ProblemSelectorButton = ({
|
|
19
|
+
text,
|
|
20
|
+
state,
|
|
21
|
+
onClick,
|
|
22
|
+
badgeValue,
|
|
23
|
+
locked,
|
|
24
|
+
}: ProblemSelectorButtonProps) => {
|
|
25
|
+
const customColorScheme = COLOR_SCHEME_MAP[state]
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<View style={styles.wrapper}>
|
|
29
|
+
<Button
|
|
30
|
+
variant={ButtonVariant.PRIMARY}
|
|
31
|
+
size={ButtonSize.MEDIUM}
|
|
32
|
+
customColorScheme={customColorScheme}
|
|
33
|
+
onPress={onClick}
|
|
34
|
+
style={{
|
|
35
|
+
button: styles.button,
|
|
36
|
+
}}
|
|
37
|
+
disabled={locked}
|
|
38
|
+
icon={
|
|
39
|
+
locked ? (
|
|
40
|
+
<LockIcon
|
|
41
|
+
height={ICON_SIZE.height}
|
|
42
|
+
width={ICON_SIZE.width}
|
|
43
|
+
color={customColorScheme[ButtonStates.DISABLED]?.color}
|
|
44
|
+
/>
|
|
45
|
+
) : (
|
|
46
|
+
<Typography
|
|
47
|
+
variant="h2"
|
|
48
|
+
style={{ color: customColorScheme[ButtonStates.DEFAULT]?.color }}
|
|
49
|
+
>
|
|
50
|
+
{text ?? ''}
|
|
51
|
+
</Typography>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
{typeof badgeValue === 'number' && (
|
|
57
|
+
<UnreadMessagesBadge
|
|
58
|
+
badgeContent={badgeValue !== 0 ? badgeValue : undefined}
|
|
59
|
+
withBorder
|
|
60
|
+
style={[
|
|
61
|
+
styles.badge,
|
|
62
|
+
{
|
|
63
|
+
top: badgeValue ? 0 : BADGE_COORDINATES.top,
|
|
64
|
+
right: badgeValue ? 0 : BADGE_COORDINATES.right,
|
|
65
|
+
},
|
|
66
|
+
]}
|
|
67
|
+
/>
|
|
68
|
+
)}
|
|
69
|
+
</View>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const styles = StyleSheet.create({
|
|
74
|
+
wrapper: { position: 'relative' },
|
|
75
|
+
badge: { position: 'absolute' },
|
|
76
|
+
button: {
|
|
77
|
+
width: BUTTON_SIZE,
|
|
78
|
+
height: BUTTON_SIZE,
|
|
79
|
+
borderWidth: 2.75,
|
|
80
|
+
},
|
|
81
|
+
})
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ButtonColorPreset, ButtonStates, COLORS } from '@magmamath/react-native-ui'
|
|
2
|
+
import { ProblemSelectorButtonState } from './types'
|
|
3
|
+
|
|
4
|
+
export const BUTTON_SIZE = 49.5
|
|
5
|
+
export const BADGE_COORDINATES = { top: 4, right: 4 }
|
|
6
|
+
export const ICON_SIZE = { width: 23, height: 25 }
|
|
7
|
+
export const PROBLEM_SELECTOR_CONTENT_WIDTH = 265
|
|
8
|
+
|
|
9
|
+
export const PROBLEM_SELECTOR_BUTTON_STATE = {
|
|
10
|
+
SELECTED: 'selected',
|
|
11
|
+
SELECTED_EXAM: 'selected-exam',
|
|
12
|
+
SOLVED: 'solved',
|
|
13
|
+
SOLVED_FIRST_ATTEMPT: 'solved-first-attempt',
|
|
14
|
+
NOT_SOLVED: 'not-solved',
|
|
15
|
+
MISTAKE: 'mistake',
|
|
16
|
+
EXAM: 'exam',
|
|
17
|
+
} as const
|
|
18
|
+
|
|
19
|
+
const colorPreset = (bg: string, border: string, color: string, raise: string = border) => ({
|
|
20
|
+
backgroundColor: bg,
|
|
21
|
+
borderColor: border,
|
|
22
|
+
color,
|
|
23
|
+
raiseColor: raise,
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
export const COLOR_SCHEME_MAP: Record<ProblemSelectorButtonState, ButtonColorPreset> = {
|
|
27
|
+
[PROBLEM_SELECTOR_BUTTON_STATE.SELECTED]: {
|
|
28
|
+
[ButtonStates.DEFAULT]: colorPreset(COLORS.BLUE_1, COLORS.PRIMARY_BLUE, COLORS.PRIMARY_BLUE),
|
|
29
|
+
[ButtonStates.HOVER]: colorPreset(COLORS.BLUE_1, COLORS.BLUE_4, COLORS.BLUE_4),
|
|
30
|
+
[ButtonStates.ACTIVE]: colorPreset(COLORS.BLUE_1, COLORS.BLUE_4, COLORS.BLUE_4),
|
|
31
|
+
[ButtonStates.PRESSED]: colorPreset(COLORS.BLUE_1, COLORS.BLUE_4, COLORS.BLUE_4),
|
|
32
|
+
[ButtonStates.DISABLED]: colorPreset(COLORS.BLUE_1, COLORS.BLUE_3, COLORS.BLUE_3),
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
[PROBLEM_SELECTOR_BUTTON_STATE.SELECTED_EXAM]: {
|
|
36
|
+
[ButtonStates.DEFAULT]: colorPreset(
|
|
37
|
+
COLORS.PURPLE_1,
|
|
38
|
+
COLORS.PRIMARY_PURPLE,
|
|
39
|
+
COLORS.PRIMARY_PURPLE,
|
|
40
|
+
),
|
|
41
|
+
[ButtonStates.HOVER]: colorPreset(COLORS.PURPLE_1, COLORS.PURPLE_4, COLORS.PURPLE_4),
|
|
42
|
+
[ButtonStates.ACTIVE]: colorPreset(COLORS.PURPLE_1, COLORS.PURPLE_4, COLORS.PURPLE_4),
|
|
43
|
+
[ButtonStates.PRESSED]: colorPreset(COLORS.PURPLE_1, COLORS.PURPLE_4, COLORS.PURPLE_4),
|
|
44
|
+
[ButtonStates.DISABLED]: colorPreset(COLORS.PURPLE_1, COLORS.PURPLE_3, COLORS.PURPLE_3),
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
[PROBLEM_SELECTOR_BUTTON_STATE.MISTAKE]: {
|
|
48
|
+
[ButtonStates.DEFAULT]: colorPreset(COLORS.PRIMARY_RED, COLORS.PRIMARY_RED, COLORS.NEUTRAL_1),
|
|
49
|
+
[ButtonStates.HOVER]: colorPreset(COLORS.RED_4, COLORS.RED_4, COLORS.NEUTRAL_1),
|
|
50
|
+
[ButtonStates.ACTIVE]: colorPreset(COLORS.RED_4, COLORS.RED_4, COLORS.NEUTRAL_1),
|
|
51
|
+
[ButtonStates.PRESSED]: colorPreset(COLORS.RED_4, COLORS.RED_4, COLORS.NEUTRAL_1),
|
|
52
|
+
[ButtonStates.DISABLED]: colorPreset(COLORS.RED_3, COLORS.RED_3, COLORS.NEUTRAL_1),
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
[PROBLEM_SELECTOR_BUTTON_STATE.SOLVED]: {
|
|
56
|
+
[ButtonStates.DEFAULT]: colorPreset(
|
|
57
|
+
COLORS.PRIMARY_YELLOW,
|
|
58
|
+
COLORS.PRIMARY_YELLOW,
|
|
59
|
+
COLORS.NEUTRAL_1,
|
|
60
|
+
),
|
|
61
|
+
[ButtonStates.HOVER]: colorPreset(COLORS.YELLOW_4, COLORS.YELLOW_4, COLORS.NEUTRAL_1),
|
|
62
|
+
[ButtonStates.ACTIVE]: colorPreset(COLORS.YELLOW_4, COLORS.YELLOW_4, COLORS.NEUTRAL_1),
|
|
63
|
+
[ButtonStates.PRESSED]: colorPreset(COLORS.YELLOW_4, COLORS.YELLOW_4, COLORS.NEUTRAL_1),
|
|
64
|
+
[ButtonStates.DISABLED]: colorPreset(COLORS.YELLOW_3, COLORS.YELLOW_3, COLORS.NEUTRAL_1),
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
[PROBLEM_SELECTOR_BUTTON_STATE.SOLVED_FIRST_ATTEMPT]: {
|
|
68
|
+
[ButtonStates.DEFAULT]: colorPreset(
|
|
69
|
+
COLORS.PRIMARY_GREEN,
|
|
70
|
+
COLORS.PRIMARY_GREEN,
|
|
71
|
+
COLORS.NEUTRAL_1,
|
|
72
|
+
),
|
|
73
|
+
[ButtonStates.HOVER]: colorPreset(COLORS.GREEN_4, COLORS.GREEN_4, COLORS.NEUTRAL_1),
|
|
74
|
+
[ButtonStates.ACTIVE]: colorPreset(COLORS.GREEN_4, COLORS.GREEN_4, COLORS.NEUTRAL_1),
|
|
75
|
+
[ButtonStates.PRESSED]: colorPreset(COLORS.GREEN_4, COLORS.GREEN_4, COLORS.NEUTRAL_1),
|
|
76
|
+
[ButtonStates.DISABLED]: colorPreset(COLORS.GREEN_3, COLORS.GREEN_3, COLORS.NEUTRAL_1),
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
[PROBLEM_SELECTOR_BUTTON_STATE.NOT_SOLVED]: {
|
|
80
|
+
[ButtonStates.DEFAULT]: colorPreset(COLORS.NEUTRAL_4, COLORS.NEUTRAL_4, COLORS.NEUTRAL_10),
|
|
81
|
+
[ButtonStates.HOVER]: colorPreset(COLORS.NEUTRAL_3, COLORS.NEUTRAL_3, COLORS.NEUTRAL_10),
|
|
82
|
+
[ButtonStates.ACTIVE]: colorPreset(COLORS.NEUTRAL_3, COLORS.NEUTRAL_3, COLORS.NEUTRAL_10),
|
|
83
|
+
[ButtonStates.PRESSED]: colorPreset(COLORS.NEUTRAL_3, COLORS.NEUTRAL_3, COLORS.NEUTRAL_10),
|
|
84
|
+
[ButtonStates.DISABLED]: colorPreset(COLORS.NEUTRAL_3, COLORS.NEUTRAL_3, COLORS.NEUTRAL_6),
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
[PROBLEM_SELECTOR_BUTTON_STATE.EXAM]: {
|
|
88
|
+
[ButtonStates.DEFAULT]: colorPreset(
|
|
89
|
+
COLORS.PRIMARY_PURPLE,
|
|
90
|
+
COLORS.PRIMARY_PURPLE,
|
|
91
|
+
COLORS.NEUTRAL_1,
|
|
92
|
+
),
|
|
93
|
+
[ButtonStates.HOVER]: colorPreset(COLORS.PURPLE_4, COLORS.PURPLE_4, COLORS.NEUTRAL_1),
|
|
94
|
+
[ButtonStates.ACTIVE]: colorPreset(
|
|
95
|
+
COLORS.PRIMARY_PURPLE,
|
|
96
|
+
COLORS.PRIMARY_PURPLE,
|
|
97
|
+
COLORS.NEUTRAL_1,
|
|
98
|
+
),
|
|
99
|
+
[ButtonStates.PRESSED]: colorPreset(
|
|
100
|
+
COLORS.PRIMARY_PURPLE,
|
|
101
|
+
COLORS.PRIMARY_PURPLE,
|
|
102
|
+
COLORS.NEUTRAL_1,
|
|
103
|
+
),
|
|
104
|
+
[ButtonStates.DISABLED]: colorPreset(COLORS.PURPLE_3, COLORS.PURPLE_3, COLORS.NEUTRAL_1),
|
|
105
|
+
},
|
|
106
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PROBLEM_SELECTOR_BUTTON_STATE } from './constants'
|
|
2
|
+
|
|
3
|
+
export type ProblemSelectorButtonState =
|
|
4
|
+
(typeof PROBLEM_SELECTOR_BUTTON_STATE)[keyof typeof PROBLEM_SELECTOR_BUTTON_STATE]
|
|
5
|
+
|
|
6
|
+
export type ProblemSelectorButtonProps = {
|
|
7
|
+
key: string
|
|
8
|
+
text: string
|
|
9
|
+
state: ProblemSelectorButtonState
|
|
10
|
+
locked: boolean
|
|
11
|
+
onClick: () => void
|
|
12
|
+
badgeValue?: number
|
|
13
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path, Rect } from 'react-native-svg'
|
|
3
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
import { IconProps } from './icon.types'
|
|
6
|
+
|
|
7
|
+
export const LockIcon = ({ width = 23, height = 25, color = COLORS.NEUTRAL_6 }: IconProps) => (
|
|
8
|
+
<Svg width={width} height={height} viewBox="0.5 1 23 25" fill="none">
|
|
9
|
+
<Path
|
|
10
|
+
fillRule="evenodd"
|
|
11
|
+
clipRule="evenodd"
|
|
12
|
+
d="M4.183 8.91H3.44A2.578 2.578 0 00.862 11.49v11.068a2.578 2.578 0 002.578 2.578h17.12a2.578 2.578 0 002.578-2.578V11.49a2.578 2.578 0 00-2.578-2.578h-.743c-.119-1.421-.391-3.307-1.374-4.897C17.304 2.172 15.303.864 12 .864c-3.304 0-5.304 1.308-6.443 3.15-.983 1.59-1.255 3.476-1.374 4.897zm2.008 0h11.618c-.12-1.303-.369-2.714-1.067-3.844C16.002 3.87 14.68 2.864 12 2.864c-2.68 0-4.003 1.006-4.742 2.202-.699 1.13-.947 2.54-1.067 3.845zm-2.75 2H20.56c.319 0 .578.26.578.579v11.068c0 .32-.26.578-.578.578H3.44a.578.578 0 01-.578-.578V11.49c0-.32.26-.578.578-.578z"
|
|
13
|
+
fill={color}
|
|
14
|
+
/>
|
|
15
|
+
</Svg>
|
|
16
|
+
)
|