Skip to content

Commit

Permalink
chore(ui): simplified html of the prev-next-btns component
Browse files Browse the repository at this point in the history
Also do not include it in the ui-inputs module; as a standalone component,
it should be imported wherever this is necessary
  • Loading branch information
jahow committed May 9, 2024
1 parent 25dc8b3 commit 3346bdb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 5 additions & 1 deletion apps/datahub/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ import {
THUMBNAIL_PLACEHOLDER,
UiElementsModule,
} from '@geonetwork-ui/ui/elements'
import { UiInputsModule } from '@geonetwork-ui/ui/inputs'
import {
PreviousNextButtonsComponent,
UiInputsModule,
} from '@geonetwork-ui/ui/inputs'
import {
BlockListComponent,
CarouselComponent,
Expand Down Expand Up @@ -158,6 +161,7 @@ export const metaReducers: MetaReducer[] = !environment.production ? [] : []
LinkCardComponent,
CarouselComponent,
BlockListComponent,
PreviousNextButtonsComponent,
],
providers: [
importProvidersFrom(FeatureAuthModule),
Expand Down
1 change: 1 addition & 0 deletions libs/ui/inputs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ export * from './lib/text-area/text-area.component'
export * from './lib/text-input/text-input.component'
export * from './lib/ui-inputs.module'
export * from './lib/viewport-intersector/viewport-intersector.component'
export * from './lib/previous-next-buttons/previous-next-buttons.component'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:host {
--gn-ui-button-rounded: 100%;
--gn-ui-button-width: 8px;
--gn-ui-button-height: 8px;
--gn-ui-button-padding: 12px;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<div class="flex flex-row gap-x-4 items-center">
<gn-ui-button
data-test="previousButton"
[style.--gn-ui-button-rounded]="'100%'"
[style.--gn-ui-button-width]="'8px'"
[style.--gn-ui-button-height]="'8px'"
[style.--gn-ui-button-padding]="'12px'"
[type]="isFirst ? 'default' : 'outline'"
[disabled]="isFirst"
(buttonClick)="previousButtonClicked()"
Expand All @@ -17,10 +13,6 @@
</gn-ui-button>
<gn-ui-button
data-test="nextButton"
[style.--gn-ui-button-rounded]="'100%'"
[style.--gn-ui-button-width]="'8px'"
[style.--gn-ui-button-height]="'8px'"
[style.--gn-ui-button-padding]="'12px'"
[type]="isLast ? 'default' : 'outline'"
[disabled]="isLast"
(buttonClick)="nextButtonClicked()"
Expand Down
3 changes: 0 additions & 3 deletions libs/ui/inputs/src/lib/ui-inputs.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { MatDatepickerModule } from '@angular/material/datepicker'
import { MatNativeDateModule } from '@angular/material/core'
import { EditableLabelDirective } from './editable-label/editable-label.directive'
import { ImageInputComponent } from './image-input/image-input.component'
import { PreviousNextButtonsComponent } from './previous-next-buttons/previous-next-buttons.component'

@NgModule({
declarations: [
Expand Down Expand Up @@ -74,7 +73,6 @@ import { PreviousNextButtonsComponent } from './previous-next-buttons/previous-n
ImageInputComponent,
DropdownSelectorComponent,
DateRangePickerComponent,
PreviousNextButtonsComponent,
],
exports: [
DropdownSelectorComponent,
Expand All @@ -95,7 +93,6 @@ import { PreviousNextButtonsComponent } from './previous-next-buttons/previous-n
DateRangePickerComponent,
EditableLabelDirective,
ImageInputComponent,
PreviousNextButtonsComponent,
],
})
export class UiInputsModule {}

0 comments on commit 3346bdb

Please sign in to comment.