@sphereon/ui-components.ssi-react-native 0.3.1-unstable.27 → 0.3.1-unstable.28
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ColorValue,
|
|
3
|
-
export interface Props extends Omit<
|
|
2
|
+
import { ColorValue, PressableProps, ViewStyle } from 'react-native';
|
|
3
|
+
export interface Props extends Omit<PressableProps, 'disabled'> {
|
|
4
4
|
caption: string;
|
|
5
5
|
onPress: () => void;
|
|
6
6
|
disabled?: boolean | (() => boolean);
|
|
@@ -7,12 +7,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const ui_components_core_1 = require("@sphereon/ui-components.core");
|
|
8
8
|
const styles_1 = require("../../../styles");
|
|
9
9
|
const PrimaryButton = (props) => {
|
|
10
|
-
const { captionColor = ui_components_core_1.fontColors.light, backgroundColors = [ui_components_core_1.gradientsColors['100'].secondaryColor, ui_components_core_1.gradientsColors['100'].primaryColor], onPress, style, caption,
|
|
10
|
+
const { captionColor = ui_components_core_1.fontColors.light, backgroundColors = [ui_components_core_1.gradientsColors['100'].secondaryColor, ui_components_core_1.gradientsColors['100'].primaryColor], onPress, style, caption, } = props;
|
|
11
11
|
const disabled = typeof props.disabled === 'function' ? props.disabled() : props.disabled ?? false;
|
|
12
12
|
if (backgroundColors.length === 1) {
|
|
13
13
|
backgroundColors.push(backgroundColors[0]);
|
|
14
14
|
}
|
|
15
|
-
return (<styles_1.SSITouchableOpacityButtonFlexRowStyled
|
|
15
|
+
return (<styles_1.SSITouchableOpacityButtonFlexRowStyled onPress={onPress} disabled={disabled} activeOpacity={ui_components_core_1.OpacityStyleEnum.DISABLED} style={{
|
|
16
16
|
...(disabled && { opacity: ui_components_core_1.OpacityStyleEnum.DISABLED }),
|
|
17
17
|
}}>
|
|
18
18
|
<styles_1.SSIRoundedCenteredLinearGradientStyled style={{ ...style }} colors={backgroundColors}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ColorValue,
|
|
3
|
-
export interface Props extends Omit<
|
|
2
|
+
import { ColorValue, PressableProps, ViewStyle } from 'react-native';
|
|
3
|
+
export interface Props extends Omit<PressableProps, 'disabled'> {
|
|
4
4
|
caption: string;
|
|
5
5
|
onPress: () => void;
|
|
6
6
|
disabled?: boolean | (() => boolean);
|
|
@@ -7,12 +7,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const ui_components_core_1 = require("@sphereon/ui-components.core");
|
|
8
8
|
const styles_1 = require("../../../styles");
|
|
9
9
|
const SecondaryButton = (props) => {
|
|
10
|
-
const { caption, captionColor = ui_components_core_1.fontColors.secondaryButton, borderColors = [ui_components_core_1.gradientsColors['100'].secondaryColor, ui_components_core_1.gradientsColors['100'].primaryColor], onPress, style,
|
|
10
|
+
const { caption, captionColor = ui_components_core_1.fontColors.secondaryButton, borderColors = [ui_components_core_1.gradientsColors['100'].secondaryColor, ui_components_core_1.gradientsColors['100'].primaryColor], onPress, style, } = props;
|
|
11
11
|
const disabled = typeof props.disabled === 'function' ? props.disabled() : props.disabled ?? false;
|
|
12
12
|
if (borderColors.length === 1) {
|
|
13
13
|
borderColors.push(borderColors[0]);
|
|
14
14
|
}
|
|
15
|
-
return (<styles_1.SSITouchableOpacityButtonFlexRowStyled
|
|
15
|
+
return (<styles_1.SSITouchableOpacityButtonFlexRowStyled onPress={onPress} disabled={disabled} activeOpacity={ui_components_core_1.OpacityStyleEnum.DISABLED} style={{
|
|
16
16
|
...(disabled && { opacity: ui_components_core_1.OpacityStyleEnum.DISABLED }),
|
|
17
17
|
}}>
|
|
18
18
|
<styles_1.SecondaryButtonMaskedViewStyled style={{ ...style }} maskElement={<styles_1.SecondaryButtonMaskContainerStyled style={{ ...style }}>{caption && <styles_1.SSITextH2SecondaryButtonStyled>{caption}</styles_1.SSITextH2SecondaryButtonStyled>}</styles_1.SecondaryButtonMaskContainerStyled>}>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ui-components.ssi-react-native",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.1-unstable.
|
|
4
|
+
"version": "0.3.1-unstable.28+70bbd0e",
|
|
5
5
|
"description": "SSI UI components for React-Native",
|
|
6
6
|
"repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
|
|
7
7
|
"author": "Sphereon <dev@sphereon.com>",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@react-native-community/blur": "^4.4.0",
|
|
32
32
|
"@react-native-masked-view/masked-view": "^0.3.1",
|
|
33
|
-
"@sphereon/ui-components.core": "0.3.1-unstable.
|
|
33
|
+
"@sphereon/ui-components.core": "0.3.1-unstable.28+70bbd0e",
|
|
34
34
|
"expo-linear-gradient": "~13.0.2",
|
|
35
35
|
"react-native-fast-image": "^8.6.3",
|
|
36
36
|
"react-native-size-matters": "^0.4.2",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": ">= 18",
|
|
47
47
|
"react-native": "~0.74.3"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "70bbd0e63c13733ff58f32dd2f570b62a74e2c8c"
|
|
50
50
|
}
|