Skip to content

Commit 0b1c615

Browse files
authored
Merge pull request #4838 from GeekyAnts/feat/v3.4-design-updates
Feat/v3.4 design updates
2 parents 9c5e3e7 + aac9443 commit 0b1c615

File tree

5 files changed

+47
-2
lines changed

5 files changed

+47
-2
lines changed

src/components/primitives/Input/InputGroup.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,34 @@ import { extractInObject, stylingProps } from '../../../theme/tools/utils';
66
import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
77

88
const supplyPropsToChildren = (children: any, props: any) => {
9+
if (children.length >= 2) {
10+
const result = [];
11+
const firstChild = children[0];
12+
const firstChildProps = {
13+
...firstChild.props.children,
14+
borderTopRightRadius: 0,
15+
borderBottomRightRadius: 0,
16+
};
17+
result.push(
18+
React.cloneElement(firstChild, firstChildProps, firstChild.props.children)
19+
);
20+
for (let i = 1; i < children.length - 1; i++) {
21+
const child = children[i];
22+
const newProps = { ...props, borderRadius: '0' };
23+
result.push(React.cloneElement(child, newProps, child.props.children));
24+
}
25+
const lastChild = children[children.length - 1];
26+
const lastChildProps = {
27+
...lastChild.props.children,
28+
borderTopLeftRadius: 0,
29+
borderBottomLeftRadius: 0,
30+
};
31+
result.push(
32+
React.cloneElement(lastChild, lastChildProps, lastChild.props.children)
33+
);
34+
return result;
35+
}
36+
937
return React.Children.map(children, (child: JSX.Element) => {
1038
return React.cloneElement(child, props, child.props.children);
1139
});

src/theme/components/actionsheet.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ export const ActionsheetItem = {
6363
bg: 'muted.200',
6464
},
6565
_pressed: {
66+
bg: 'muted.400',
67+
},
68+
_focusVisible: {
69+
_web: {
70+
outlineWidth: '0',
71+
style: { boxShadow: `none` },
72+
bg: 'muted.300',
73+
},
6674
bg: 'muted.300',
6775
},
6876
},
@@ -74,7 +82,14 @@ export const ActionsheetItem = {
7482
bg: 'muted.700',
7583
},
7684
_pressed: {
77-
bg: 'muted.600',
85+
bg: 'muted.500',
86+
},
87+
_focusVisible: {
88+
_web: {
89+
outlineWidth: '0',
90+
style: { boxShadow: `none` },
91+
bg: 'muted.600',
92+
},
7893
},
7994
},
8095
}),

src/theme/components/icon-button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ const baseStyle = (props: any) => {
2727
userSelect: 'none',
2828
},
2929
_focus: {
30-
borderWidth: 2,
3130
borderColor: `${colorScheme}.400`,
3231
},
3332
_focusVisible: {
33+
borderWidth: 2,
3434
_web: {
3535
outlineWidth: '0',
3636
style: { ...focusRing },

src/theme/components/inputleftaddon.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const baseStyle = () => {
44
p: '2',
55
borderWidth: '1',
66
borderRightWidth: '0',
7+
borderLeftRadius: 'sm',
78
_text: {
89
fontWeight: 400,
910
},

src/theme/components/inputrightaddon.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const baseStyle = () => {
44
p: '2',
55
borderWidth: '1',
66
borderLeftWidth: '0',
7+
borderRightRadius: 'sm',
78
_text: {
89
fontWeight: 400,
910
},

0 commit comments

Comments
 (0)