Skip to content

Commit

Permalink
fix(toggle): box-sizing & display
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Esteves <[email protected]>
  • Loading branch information
aesteves60 authored and dpellier committed Nov 28, 2024
1 parent 9a464d2 commit df512ca
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class OdsInput {
}

@Method()
async toggleMask(): Promise<void> {
public async toggleMask(): Promise<void> {
this.isMasked = !this.isMasked;
this.odsToggleMask.emit();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class OdsTextarea {
}

@Method()
async reset(): Promise<void> {
public async reset(): Promise<void> {
this.odsReset.emit();
this.value = this.defaultValue ?? null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ describe('ods-textarea validity', () => {
describe('willValidate', () => {
it('should return true if element is submittable', async() => {
await setup('<ods-textarea></ods-textarea>');

expect(await el.callMethod('willValidate')).toBe(true);
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
@use '../../../../../style/focus';
@use '../../../../../style/state';

:host(.ods-toggle) {
display: inline-block;
}

.ods-toggle {
&__container {
box-sizing: border-box;
display: inline-block;
position: relative;
border: 1px solid transparent;
Expand All @@ -25,8 +30,8 @@

&::before {
position: absolute;
bottom: 2px;
left: 2px;
bottom: 1px;
left: 1px;
transition: all .4s ease;
z-index: 1;
border-radius: 1rem;
Expand Down Expand Up @@ -64,7 +69,7 @@
right: 0;
bottom: 0;
align-items: center;
padding-right: 4px;
padding-right: 1px;
color: var(--ods-color-neutral-700);
font-size: 12px;
font-weight: 700;
Expand Down

0 comments on commit df512ca

Please sign in to comment.