Skip to content

Commit

Permalink
fix(Expiry): correct class placement and CSS specificity issue
Browse files Browse the repository at this point in the history
This PR is based on #2914
  • Loading branch information
tujoworker committed Nov 17, 2023
1 parent 4d2f9fd commit e09a410
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import * as Examples from './Examples'

The locale is what determines the components `placeholder` format .e.g. `mm/åå` in norwegian, `mm/yy` in english.

<ChangeLocale bottom label="Locale used in the demos:" showUS={true} />
<ChangeLocale
bottom
label="Locale used in the demos:"
listUSLocale={true}
/>

English (US) is not included in Eufemia by default. You can include it like:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Expiry(props: ExpiryProps) {

return (
<FieldBlock
className={classnames(className)}
className={classnames('dnb-forms-field-expiry', className)}
labelSecondary={labelSecondary}
labelDescription={labelDescription}
info={info}
Expand All @@ -61,8 +61,8 @@ function Expiry(props: ExpiryProps) {
{...pickSpacingProps(props)}
>
<MultiInputMask
stretch
id={`${idRef}__input`}
className="dnb-forms-field-expiry"
label={label}
labelDirection={layout}
values={expiry}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@import '../../style/field-sizes.scss';

.dnb-forms-field-expiry {
width: var(--forms-field-width--small);
.dnb-multi-input-mask {
width: var(--forms-field-width--small);

.dnb-input__shell {
justify-content: center;
.dnb-input__shell {
justify-content: center;
}
}
}

0 comments on commit e09a410

Please sign in to comment.