-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from geonetwork/dh-keyword-routerlink
Datahub: search on keyword
- Loading branch information
Showing
11 changed files
with
122 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
<div | ||
class=" | ||
inline-block | ||
bg-black | ||
opacity-70 | ||
py-1.5 | ||
px-3 | ||
rounded | ||
font-medium | ||
text-gray-50 text-sm | ||
leading-none | ||
" | ||
class="inline-block bg-black opacity-70 py-1.5 px-3 rounded font-medium text-gray-50 text-sm leading-none" | ||
[class.hover:bg-gray-800]="clickable" | ||
[class.cursor-pointer]="clickable" | ||
> | ||
<ng-content></ng-content> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,35 @@ | ||
import { Meta, moduleMetadata, Story } from '@storybook/angular' | ||
import { | ||
componentWrapperDecorator, | ||
Meta, | ||
moduleMetadata, | ||
Story, | ||
} from '@storybook/angular' | ||
import { BadgeComponent } from './badge.component' | ||
|
||
export default { | ||
title: 'Widgets/BadgeComponent', | ||
component: BadgeComponent, | ||
decorators: [ | ||
componentWrapperDecorator(BadgeComponent), | ||
moduleMetadata({ | ||
imports: [], | ||
}), | ||
], | ||
} as Meta<BadgeComponent> | ||
|
||
type BadgeComponentWithContent = { content: string } | ||
|
||
const Template: Story<BadgeComponentWithContent> = (args: BadgeComponent) => ({ | ||
interface BadgeComponentContent extends Partial<BadgeComponent> { | ||
content: string | ||
} | ||
const Template: Story<BadgeComponentContent> = ( | ||
args: BadgeComponentContent | ||
) => ({ | ||
component: BadgeComponent, | ||
props: args, | ||
template: '<gn-ui-badge>{{content}}</gn-ui-badge>', | ||
}) | ||
|
||
export const Primary = Template.bind({}) | ||
Primary.args = { | ||
content: 'My badge!', | ||
clickable: true, | ||
content: 'My custom badge', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core' | ||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'gn-ui-badge', | ||
templateUrl: './badge.component.html', | ||
styleUrls: ['./badge.component.css'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class BadgeComponent {} | ||
export class BadgeComponent { | ||
@Input() clickable? = false | ||
} |