Skip to content

Commit

Permalink
Update prettierrc, format code
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchthorson committed Dec 6, 2023
1 parent 2e687a6 commit 44c0bfb
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 270 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"useTabs": true,
"tabWidth": 2,
"singleQuote": false,
"trailingComma": "none",
"printWidth": 100,
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 0.1.0

- Update .prettierrc
- Add color utility module
- Add Storybook instance for documentation and testing
- Simplify global styles, move to lib folder
Expand Down
14 changes: 7 additions & 7 deletions src/lib/BasicDropdown/BasicDropdown.svelte
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script>
import { createEventDispatcher } from "svelte";
import { createEventDispatcher } from "svelte";
import { urbanColors } from "$lib/utils";
import "$lib/style/app.css";
import "$lib/style/app.css";
// define arguments
// define arguments
/**
/**
* Unique id given to the dropdown DOM node
* @type {string}
*/
export let id;
* @type {string}
*/
export let id;
/**
* Binds to the current value for the dropdown (data.value)
Expand Down
156 changes: 78 additions & 78 deletions src/lib/Scorecard/Scorecard.svelte
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
<script>
import "$lib/style/app.css";
/**
* @type {string} Scorecard value
*/
export let value;
/**
* @type {string} Scorecard label
*/
export let label;
/**
* @type {string} Scorecard value
*/
export let value;
/**
* @type {string} Scorecard label
*/
export let label;
</script>

<div class="scorecard-container">
<!-- scorecard value -->
{#if value}
<div class="scorecard-number">
<div class="scorecard-number-inner">
{value}
</div>
</div>
{/if}
<!-- scorecard label -->
{#if label}
<div class="scorecard-text-group font-light">
<div class="scorecard-text">
{label}
</div>
</div>
{/if}
<!-- scorecard value -->
{#if value}
<div class="scorecard-number">
<div class="scorecard-number-inner">
{value}
</div>
</div>
{/if}
<!-- scorecard label -->
{#if label}
<div class="scorecard-text-group font-light">
<div class="scorecard-text">
{label}
</div>
</div>
{/if}
</div>

<style>
.scorecard-container {
display: flex;
flex-direction: row;
gap: 2px;
max-height: var(--spacing-20);
height: var(--spacing-20);
}
.scorecard-container {
display: flex;
flex-direction: row;
gap: 2px;
max-height: var(--spacing-20);
height: var(--spacing-20);
}
.scorecard-number {
display: flex;
align-items: center;
font-size: var(--font-size-4xl);
font-weight: var(--font-weight-bold);
height: var(--spacing-20);
color: var(--color-white);
background-color: var(--color-blue-shade-darker);
padding: 0 1rem;
text-decoration: underline;
text-underline-offset: var(--spacing-2);
text-decoration-color: var(--color-blue);
text-decoration-thickness: var(--spacing-1);
}
.scorecard-number-inner {
transform: translateY(-6px);
}
.scorecard-number {
display: flex;
align-items: center;
font-size: var(--font-size-4xl);
font-weight: var(--font-weight-bold);
height: var(--spacing-20);
color: var(--color-white);
background-color: var(--color-blue-shade-darker);
padding: 0 1rem;
text-decoration: underline;
text-underline-offset: var(--spacing-2);
text-decoration-color: var(--color-blue);
text-decoration-thickness: var(--spacing-1);
}
.scorecard-number-inner {
transform: translateY(-6px);
}
.scorecard-text-group {
display: flex;
align-items: center;
height: var(--spacing-20);
background-color: var(--color-gray-shade-light);
}
.scorecard-text-group {
display: flex;
align-items: center;
height: var(--spacing-20);
background-color: var(--color-gray-shade-light);
}
.scorecard-text {
font-size: var(--font-size-3xl);
overflow: nowrap;
padding: 0 var(--spacing-4);
text-transform: uppercase;
}
.scorecard-text {
font-size: var(--font-size-3xl);
overflow: nowrap;
padding: 0 var(--spacing-4);
text-transform: uppercase;
}
/* on smaller screens, reduce font size so there's no vertical stacking */
@media screen and (max-width: 450px) {
.scorecard-text {
font-size: var(--font-size-2xl);
}
}
/* on smaller screens, reduce font size so there's no vertical stacking */
@media screen and (max-width: 450px) {
.scorecard-text {
font-size: var(--font-size-2xl);
}
}
@media screen and (max-width: 376px) {
.scorecard-number {
height: var(--spacing-16);
}
.scorecard-container {
height: var(--spacing-16);
max-height: var(--spacing-16);
}
.scorecard-text-group {
height: var(--spacing-16);
}
}
@media screen and (max-width: 376px) {
.scorecard-number {
height: var(--spacing-16);
}
.scorecard-container {
height: var(--spacing-16);
max-height: var(--spacing-16);
}
.scorecard-text-group {
height: var(--spacing-16);
}
}
</style>
Loading

0 comments on commit 44c0bfb

Please sign in to comment.