Skip to content

Commit 521a40f

Browse files
committed
fix: search text field input full width style
1 parent b517822 commit 521a40f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@beeinventor/dasiot-react-component-lib",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"module": "lib/index.js",
55
"types": "lib/index.d.ts",
66
"files": [

src/components/SearchTextField/SearchTextField.stories.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ Default.args = {
2323
placeholder: 'Distributor',
2424
},
2525
};
26+
27+
export const FullWidth: Story<SearchTextFieldProps> = Template.bind({});
28+
29+
FullWidth.args = {
30+
...Default.args,
31+
width: '100%',
32+
};

src/components/SearchTextField/SearchTextField.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const Container = styled(Box)`
1717
1818
& > input {
1919
display: inline-block;
20+
width: 100%;
2021
font: inherit;
2122
font-size: 1rem;
2223
font-weight: 500;
@@ -29,6 +30,10 @@ const Container = styled(Box)`
2930
color: ${({ theme }) => theme.color.secondary.$60};
3031
}
3132
}
33+
34+
& > svg {
35+
flex: 0 0 auto;
36+
}
3237
`;
3338

3439
const SearchTextField: React.FC<SearchTextFieldProps> = ({

0 commit comments

Comments
 (0)