Skip to content

Commit 0361bf0

Browse files
refactor(input-otp): update according to design (#30765)
Issue number: internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? The input-otp component does not currently match our UX designs for the ionic theme. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Changed shape design tokens; - Changed background to use correct design token. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent d685d09 commit 0361bf0

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

core/src/components/input-otp/input-otp.common.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,6 @@
129129
background: var(--separator-color);
130130
}
131131

132-
// Fills
133-
// --------------------------------------------------
134-
135-
:host(.input-otp-fill-outline) {
136-
--background: none;
137-
}
138-
139132
// States
140133
// --------------------------------------------------
141134

core/src/components/input-otp/input-otp.ionic.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,24 @@
6868
// --------------------------------------------------
6969

7070
:host(.input-otp-shape-round) {
71-
--border-radius: #{globals.$ion-border-radius-400};
71+
--border-radius: #{globals.$ion-round-xl};
7272
}
7373

7474
:host(.input-otp-shape-soft) {
75-
--border-radius: #{globals.$ion-border-radius-200};
75+
--border-radius: #{globals.$ion-soft-xl};
7676
}
7777

7878
:host(.input-otp-shape-rectangular) {
79-
--border-radius: #{globals.$ion-border-radius-0};
79+
--border-radius: #{globals.$ion-rectangular-xl};
8080
}
8181

8282
// Fills
8383
// --------------------------------------------------
8484

85+
:host(.input-otp-fill-outline) {
86+
--background: #{globals.$ion-bg-input-default};
87+
}
88+
8589
:host(.input-otp-fill-solid) {
8690
--border-color: #{globals.$ion-bg-input-bold-default};
8791
--background: #{globals.$ion-bg-input-bold-default};
Loading

0 commit comments

Comments
 (0)