Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
state="${link.isActive ? 'active' : ''}"
>
</c-nav-horizontal-item>
<c-nav-horizontal-item position="right" href="https://github.com/bindable-ui/bindable" title="v1.0.24"></c-nav-horizontal-item>
<c-nav-horizontal-item position="right" href="https://github.com/bindable-ui/bindable" title="v1.0.25"></c-nav-horizontal-item>
</c-nav-horizontal>
</l-box>
</l-sidebar>
Expand Down
1 change: 1 addition & 0 deletions dev-app/routes/components/tile/properties/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<c-tile image-url="https://placeimg.com/160/200/any" image-container-height.bind="200" title="Disabled State" state="disabled"></c-tile>
<c-tile image-url="" title="No Image URL" image-container-height.bind="100" no-image-message="No Image"></c-tile>
<c-tile image-url="https://placeimg.com/160/200/any" image-container-height.bind="200" title="a test string" search-match="a test"></c-tile>
<c-tile image-url="https://placeimg.com/160/200/any" image-container-height.bind="200" title="Pill Item" pill-text="Pill Text"></c-tile>
</l-grid>
</c-code-sample>
</l-stack>
Expand Down
11 changes: 11 additions & 0 deletions dev-app/routes/components/tile/properties/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ export class TileProperties {
name: 'no-image-message',
value: 'string',
},
{
default: 'info',
description: 'Will set the color of the pill.',
name: 'pill-color',
value: 'string',
},
{
description: 'Will set the text of the pill.',
name: 'pill-text',
value: 'string',
},
{
default: 'true',
description: 'Set if you do not need the checkbox in the tile.',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bindable-ui/bindable",
"description": "An Aurelia component library",
"version": "1.0.24",
"version": "1.0.25",
"repository": {
"type": "git",
"url": "https://github.com/bindable-ui/bindable"
Expand Down
15 changes: 15 additions & 0 deletions src/components/tile/c-tile/c-tile.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Licensed under the terms of the MIT license. See the LICENSE file in the project
* - Checked
* CHECKBOX
* DRAG
* PILL
* TIP
* STATE
* - Base
Expand Down Expand Up @@ -178,6 +179,20 @@ Licensed under the terms of the MIT license. See the LICENSE file in the project



/*------------------------------------*\
!PILL
\*------------------------------------*/

.pill{
position: absolute;
top: var(--s-2);
left: var(--s-3);
}





/*------------------------------------*\
!TIP
\*------------------------------------*/
Expand Down
9 changes: 9 additions & 0 deletions src/components/tile/c-tile/c-tile.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@
class="${styles.status} ${styles[status]}"
if.bind="status"
></div>
<c-pill
class="${styles.pill}"
color="${pillColor}"
if.bind="pillText"
>
<span slot="pill-content">
${pillText}
</span>
</c-pill>
<img
if.bind="imageUrl"
src="${imageUrl}"
Expand Down
24 changes: 24 additions & 0 deletions src/components/tile/c-tile/c-tile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,30 @@ describe('c-tile component', () => {
}
});

it('css class: pill', async done => {
component = StageComponent.withResources().inView('<c-tile></c-tile>');

try {
await bootStrapEnvironment(component);
expect(component.viewModel.styles.pill).not.toBe(undefined);
done();
} catch (e) {
done.fail(e);
}
});

it('css class: tip', async done => {
component = StageComponent.withResources().inView('<c-tile></c-tile>');

try {
await bootStrapEnvironment(component);
expect(component.viewModel.styles.tip).not.toBe(undefined);
done();
} catch (e) {
done.fail(e);
}
});

const existingStateClasses = ['processing', 'healthy', 'warning', 'error', 'info'];
existingStateClasses.forEach(state => {
it(`css class: "${state}"`, async done => {
Expand Down
4 changes: 4 additions & 0 deletions src/components/tile/c-tile/c-tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export class CTile {
@bindable
public noImageMessage = 'No Image';
@bindable
public pillColor = 'info';
@bindable
public pillText;
@bindable
public searchMatch = null;
@bindable
public showCheckbox = true;
Expand Down