@widergy/mobile-ui 1.25.0 → 1.25.1
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.25.1](https://github.com/widergy/mobile-ui/compare/v1.25.0...v1.25.1) (2024-09-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* type prop name changed ([#359](https://github.com/widergy/mobile-ui/issues/359)) ([f1644bd](https://github.com/widergy/mobile-ui/commit/f1644bdf762dafc5e5e6831693f7e6fdb8c83ab1))
|
|
7
|
+
|
|
1
8
|
# [1.25.0](https://github.com/widergy/mobile-ui/compare/v1.24.1...v1.25.0) (2024-09-19)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ------------ | :---------------- | ----------- | ---------------------------------------------------------------------------------------- |
|
|
8
8
|
| actions | array | | Array of actions to render. Each action must include:`Icon`, `id` and `onPress` props. |
|
|
9
9
|
| colorTheme | string | 'primary' | The color theme to use. One of:`primary`, `secondary`, `negative`. |
|
|
10
|
-
|
|
|
10
|
+
| shape | string | 'square' | Type of the button. One of:`square`, `circle`. |
|
|
11
11
|
| selected | string / number | | Id of the active button. |
|
|
@@ -9,7 +9,12 @@ import UTButton from '../UTButton';
|
|
|
9
9
|
import { BACKGROUND_COLOR_MAPPER, DEFAULT_COLOR_THEME, DEFAULT_TYPE } from './constants';
|
|
10
10
|
import { getTypeStyles, ownStyles } from './styles';
|
|
11
11
|
|
|
12
|
-
const UTButtonGroup = ({
|
|
12
|
+
const UTButtonGroup = ({
|
|
13
|
+
actions,
|
|
14
|
+
colorTheme = DEFAULT_COLOR_THEME,
|
|
15
|
+
selected,
|
|
16
|
+
shape: type = DEFAULT_TYPE
|
|
17
|
+
}) => {
|
|
13
18
|
const theme = useTheme();
|
|
14
19
|
const backgroundColor =
|
|
15
20
|
BACKGROUND_COLOR_MAPPER(theme)[colorTheme] || BACKGROUND_COLOR_MAPPER(theme).primary;
|
|
@@ -49,7 +54,7 @@ UTButtonGroup.propTypes = {
|
|
|
49
54
|
).isRequired,
|
|
50
55
|
colorTheme: string,
|
|
51
56
|
selected: oneOfType([number, string]).isRequired,
|
|
52
|
-
|
|
57
|
+
shape: string
|
|
53
58
|
};
|
|
54
59
|
|
|
55
60
|
export default UTButtonGroup;
|
package/package.json
CHANGED