Skip to content

Commit

Permalink
fix(Forms): remove extra space from Value.* components with inline
Browse files Browse the repository at this point in the history
…property (#4246)
  • Loading branch information
tujoworker authored Nov 8, 2024
1 parent f45aa4a commit 8b96fd1
Show file tree
Hide file tree
Showing 19 changed files with 62 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.ArraySelection value={['Foo', 'Bar', 'Baz']} inline />
This is after the component
This is before the component{' '}
<Value.ArraySelection value={['Foo', 'Bar', 'Baz']} inline /> This
is after the component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.BankAccountNumber value="20001234567" inline />
This is after the component
This is before the component{' '}
<Value.BankAccountNumber value="20001234567" inline /> This is
after the component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
<span style={{ color: 'red' }}>This is before the component</span>
<Value.Boolean value={true} inline />
<span style={{ color: 'red' }}>This is before the component</span>{' '}
<Value.Boolean value={true} inline />{' '}
<span style={{ color: 'red' }}>This is after the component</span>
</P>
</ComponentBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.Currency value={25000} inline />
This is after the component
This is before the component{' '}
<Value.Currency value={25000} inline /> This is after the component
</P>
</ComponentBox>
)
Expand All @@ -66,9 +65,9 @@ export const InlineAndLabel = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.Currency label="Label text" value={25000} inline />
This is after the component
This is before the component{' '}
<Value.Currency label="Label text" value={25000} inline /> This is
after the component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.Date label="Label text" value="2023-01-16" inline />
This is after the component
This is before the component{' '}
<Value.Date label="Label text" value="2023-01-16" inline /> This is
after the component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.Email value="firstname.lastname@domain.com" inline />
This is after the component
This is before the component{' '}
<Value.Email value="firstname.lastname@domain.com" inline /> This
is after the component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export const Inline = () => {
}}
>
<P>
This is before the component
<Value.Name.First path="/firstName" inline />
<Value.Name.Last path="/lastName" inline />
This is after the component
This is before the component{' '}
<Value.Name.First path="/firstName" inline />{' '}
<Value.Name.Last path="/lastName" inline /> This is after the
component
</P>
</Form.Handler>
</ComponentBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.NationalIdentityNumber value="25017598765" inline />
This is after the component
This is before the component{' '}
<Value.NationalIdentityNumber value="25017598765" inline /> This is
after the component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.Number value={123} inline />
This is before the component <Value.Number value={123} inline />{' '}
This is after the component
</P>
</ComponentBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.OrganizationNumber value="123456789" inline />
This is after the component
This is before the component{' '}
<Value.OrganizationNumber value="123456789" inline /> This is after
the component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.PhoneNumber value="98712345" inline />
This is after the component
This is before the component{' '}
<Value.PhoneNumber value="98712345" inline /> This is after the
component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.PostalCodeAndCity value="0010 Oslo" inline />
This is after the component
This is before the component{' '}
<Value.PostalCodeAndCity value="0010 Oslo" inline /> This is after
the component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.SelectCountry value="NO" inline />
This is after the component
This is before the component{' '}
<Value.SelectCountry value="NO" inline /> This is after the
component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.Selection value="Baz" inline />
This is before the component <Value.Selection value="Baz" inline />{' '}
This is after the component
</P>
</ComponentBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export const Inline = () => {
return (
<ComponentBox>
<P>
This is before the component
<Value.String value="Text value" inline />
This is after the component
This is before the component{' '}
<Value.String value="Text value" inline /> This is after the
component
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ showTabs: true
tabs:
- title: Info
key: '/info'
- title: Demos
key: '/demos'
- title: Properties
key: '/properties'
breadcrumb:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ export const Inline = () => {
data-visual-test="value-block-inline"
>
<P>
this is before the value
<ValueBlock inline>Foo</ValueBlock>
<ValueBlock inline>Bar</ValueBlock>
this is after the value
this is before the value <ValueBlock inline>Foo</ValueBlock>{' '}
<ValueBlock inline>Bar</ValueBlock> this is after the value
</P>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Value } from '../..'
import { P } from '../../../../elements'

export default {
title: 'Eufemia/Extensions/Forms/ValueBlock',
}

export function Inline() {
return (
<P>
Max value (
<Value.Currency value={123} decimals={0} inline />)
</P>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@

&--inline:not([class*='__composition']) {
display: inline-block;
&::before,
&::after {
content: '\00A0'; // non-breaking space
}
.dnb-forms-value-block + & {
&::before {
content: none;
}
}

font-size: inherit;
}

Expand Down

0 comments on commit 8b96fd1

Please sign in to comment.