Skip to content

Commit

Permalink
Merge pull request #46 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 2.2.0
  • Loading branch information
hobbitronics authored Jul 14, 2021
2 parents 2f51ffc + 3adac45 commit e8d43ad
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.2.0](https://github.com/silinternational/ui-components/releases/tag/v2.2.0) - 2021-07-14
### Added
- noPadding to card

### Changed
- README - updated component index

## [2.1.0](https://github.com/silinternational/ui-components/releases/tag/v2.1.0) - 2021-07-13
### Changed
- README - updated installation instructions, bundler configuration and component index
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ A list of all components (subcomponents and js files for interfacing in []) foll

Button (disabled, outlined, raised, prependIcon, appendIcon, url)

Card (secondary, outlined, color, isClickable)
Card (secondary, outlined, color, isClickable, noPadding)

Checkbox (label, checked, disabled, uppercase)

Expand Down
10 changes: 7 additions & 3 deletions components/mdc/Card/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export let secondary = ''
export let outlined = false
export let color = 'white'
export let isClickable = false
export let noPadding = false
$: tabindex = isClickable ? '0' : undefined
</script>
Expand All @@ -19,19 +20,22 @@ $: tabindex = isClickable ? '0' : undefined
padding-left: 16px;
padding-right: 16px;
}
.noPadding {
padding: 0;
}
</style>

<div {tabindex} class="mdc-card mdc-typography {$$props.class}" style="background-color: {color}" class:mdc-card--outlined={outlined} class:mdc-card__primary-action={isClickable} on:click on:mousedown on:mouseup on:keypress>
{#if secondary.length}
<div class="secondary-text uppercase gray">
<div class="secondary-text uppercase gray" class:noPadding>
{secondary}
</div>
{/if}
<div class="supporting-text h-100">
<div class="supporting-text h-100" class:noPadding>
<slot />
</div>
{#if $$slots.actions}
<div class="mdc-card__actions">
<div class="mdc-card__actions" class:noPadding>
<slot name="actions" />
</div>
{/if}
Expand Down
4 changes: 2 additions & 2 deletions 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,6 +1,6 @@
{
"name": "@silintl/ui-components",
"version": "2.1.0",
"version": "2.2.0",
"description": "Reusable Svelte components for some internal applications",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e8d43ad

Please sign in to comment.