This repository has been archived by the owner on Oct 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating config and move package to organization
- Loading branch information
1 parent
50b0e51
commit b908ebd
Showing
16 changed files
with
3,758 additions
and
3,120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
{ | ||
"presets": [ | ||
"@babel/env", | ||
"@babel/preset-typescript" | ||
], | ||
"presets": ["@babel/env", "@babel/preset-typescript"], | ||
"plugins": ["@babel/plugin-transform-typescript"] | ||
} |
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,10 +1,15 @@ | ||
// https://eslint.org/docs/user-guide/configuring | ||
|
||
module.exports = { | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
jest: true | ||
} | ||
jest: true, | ||
}, | ||
// https://github.com/standard/standard/blob/master/docs/RULES-en.md | ||
extends: ["standard", "prettier"], | ||
plugins: ["@typescript-eslint"], | ||
} |
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 +1 @@ | ||
18 | ||
20 |
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,3 +1,4 @@ | ||
{ | ||
"printWidth": 120 | ||
"printWidth": 120, | ||
"semi": false | ||
} |
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,38 +1,38 @@ | ||
import { Controller } from '@hotwired/stimulus' | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
export default class ReadMore extends Controller { | ||
open: boolean | ||
contentTarget: HTMLElement | ||
moreTextValue: string | ||
lessTextValue: string | ||
|
||
static targets: string[] = ['content'] | ||
static targets: string[] = ["content"] | ||
static values = { | ||
moreText: String, | ||
lessText: String | ||
lessText: String, | ||
} | ||
|
||
connect (): void { | ||
connect(): void { | ||
this.open = false | ||
} | ||
|
||
toggle (event: Event): void { | ||
toggle(event: Event): void { | ||
this.open === false ? this.show(event) : this.hide(event) | ||
} | ||
|
||
show (event: Event): void { | ||
show(event: Event): void { | ||
this.open = true | ||
|
||
const target = event.target as HTMLElement | ||
target.innerHTML = this.lessTextValue | ||
this.contentTarget.style.setProperty('--read-more-line-clamp', "'unset'") | ||
this.contentTarget.style.setProperty("--read-more-line-clamp", "'unset'") | ||
} | ||
|
||
hide (event: Event): void { | ||
hide(event: Event): void { | ||
this.open = false | ||
|
||
const target = event.target as HTMLElement | ||
target.innerHTML = this.moreTextValue | ||
this.contentTarget.style.removeProperty('--read-more-line-clamp') | ||
this.contentTarget.style.removeProperty("--read-more-line-clamp") | ||
} | ||
} |
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,6 +1,3 @@ | ||
module.exports = { | ||
content: [ | ||
"./index.html", | ||
"./src/**/*.{js,ts,jsx,tsx}", | ||
] | ||
export default { | ||
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], | ||
} |
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
Oops, something went wrong.