Skip to content

Commit

Permalink
feat: format code.
Browse files Browse the repository at this point in the history
  • Loading branch information
noootwo committed Nov 8, 2022
1 parent 28b3b72 commit 69172af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/quark/src/marquee/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ quark-marquee {

.paused-button {
margin: 0 0 10px 20px;
}
}
2 changes: 1 addition & 1 deletion packages/quark/src/marquee/doc-react.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Text scrolling.
### Install

```tsx
import { Marquee } from "@quarkd/quark-react"
import { Marquee } from "@quarkd/quark-react";
```

### Basic Usage
Expand Down
2 changes: 1 addition & 1 deletion packages/quark/src/marquee/doc-react.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### 安装使用

```tsx
import { Marquee } from "@quarkd/quark-react"
import { Marquee } from "@quarkd/quark-react";
```

### 基础用法
Expand Down
13 changes: 7 additions & 6 deletions packages/quark/src/marquee/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class QuarkMarquee extends QuarkElement {

if (container.offsetWidth >= (this.textWidth || text.offsetWidth)) {
this.animating = false;
text.style.removeProperty('animation-duration');
text.style.removeProperty('animation-name');
text.style.removeProperty("animation-duration");
text.style.removeProperty("animation-name");
return;
}

Expand All @@ -65,19 +65,20 @@ class QuarkMarquee extends QuarkElement {
}

this.animating = true;
text.style.animationDirection = this.reverse ? 'reverse' : 'normal';
text.style.animationDirection = this.reverse ? "reverse" : "normal";
text.style.animationDuration = `${Math.round(
text.offsetWidth / Number(this.speed)
)}s`;
text.style.animationName = 'quark-marquee-animation';
text.style.animationName = "quark-marquee-animation";
};

render() {
return (
<Fragment>
<span
class={`quark-marquee-title ${this.paused ? 'quark-marquee-paused' : ''
}`}
class={`quark-marquee-title ${
this.paused ? "quark-marquee-paused" : ""
}`}
ref={this.titleRef}
onTransitionend={this.transitionEnd}
>
Expand Down
2 changes: 1 addition & 1 deletion packages/quark/src/marquee/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
100% {
transform: translateX(-100%);
}
}
}

0 comments on commit 69172af

Please sign in to comment.