File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
packages/components/src/Form/Inputs/InlineInputText Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 0.8.2]
9+
10+ ### Fixed
11+
12+ - ` InlineInputText ` was mis-rendering underlying text and not absorbing ` text-align ` from parent element
13+
814## [ 0.8.1]
915
1016### Fixed
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ const Input = styled.input.attrs({ type: 'text' })<InlineInputTextProps>`
9797 outline: none;
9898 padding: 0;
9999 position: absolute;
100+ text-align: inherit;
100101 text-transform: inherit;
101102 top: 0;
102103 width: 100%;
@@ -105,10 +106,12 @@ const Input = styled.input.attrs({ type: 'text' })<InlineInputTextProps>`
105106interface VisibleTextProps {
106107 displayValue ?: string
107108}
109+
108110const VisibleText = styled . div < VisibleTextProps > `
109111 white-space: pre;
110112 color: ${ ( { displayValue, theme } ) =>
111- displayValue ? theme . colors . text0 : theme . colors . text5 } ;
113+ displayValue ? 'transparent' : theme . colors . text5 } ;
114+ text-align: inherit;
112115`
113116
114117export const InlineInputText = styled ( InlineInputTextInternal ) `
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ exports[`InlineInputText renders an input with a placeholder 1`] = `
1212 outline : none ;
1313 padding : 0 ;
1414 position : absolute ;
15+ text - align : inherit ;
1516 text - transform : inherit ;
1617 top : 0 ;
1718 width : 100 % ;
@@ -20,6 +21,7 @@ exports[`InlineInputText renders an input with a placeholder 1`] = `
2021.c2 {
2122 white - space : pre ;
2223 color : #939BA5 ;
24+ text - align : inherit ;
2325}
2426
2527.c0 {
@@ -84,6 +86,7 @@ exports[`InlineInputText renders an input with no value 1`] = `
8486 outline : none ;
8587 padding : 0 ;
8688 position : absolute ;
89+ text - align : inherit ;
8790 text - transform : inherit ;
8891 top : 0 ;
8992 width : 100 % ;
@@ -92,6 +95,7 @@ exports[`InlineInputText renders an input with no value 1`] = `
9295.c2 {
9396 white - space : pre ;
9497 color : #939BA5 ;
98+ text - align : inherit ;
9599}
96100
97101.c0 {
@@ -156,14 +160,16 @@ exports[`InlineInputText renders an input with specific predefined value 1`] = `
156160 outline : none ;
157161 padding : 0 ;
158162 position : absolute ;
163+ text - align : inherit ;
159164 text - transform : inherit ;
160165 top : 0 ;
161166 width : 100 % ;
162167}
163168
164169.c2 {
165170 white - space : pre ;
166- color : #262D33 ;
171+ color : transparent ;
172+ text - align : inherit ;
167173}
168174
169175.c0 {
You can’t perform that action at this time.
0 commit comments