-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct promise page detail and add promise status tag story (#147)
* fix: adjust wording and spacing * feat: add promise status tag story * refactor: use svelte expression in attribute --------- Co-authored-by: Th1nkK1D <[email protected]>
- Loading branch information
Showing
5 changed files
with
66 additions
and
30 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
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
20 changes: 20 additions & 0 deletions
20
src/components/PromiseDetail/PromiseStatusTag.story.svelte
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script lang="ts"> | ||
import type { Hst } from '@histoire/plugin-svelte'; | ||
import PromiseStatusTag from './PromiseStatusTag.svelte'; | ||
import { promiseStatusList } from '../../constants/promise'; | ||
export let Hst: Hst; | ||
</script> | ||
|
||
<Hst.Story | ||
title="PromiseStatusTag" | ||
layout={{ | ||
type: 'grid' | ||
}} | ||
> | ||
{#each promiseStatusList as status} | ||
<Hst.Variant title={status.label}> | ||
<PromiseStatusTag status={status.label} /> | ||
</Hst.Variant> | ||
{/each} | ||
</Hst.Story> |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { PromiseStatus } from '$models/promise'; | ||
|
||
export const promiseStatusList = [ | ||
{ | ||
label: PromiseStatus.clarifying, | ||
text: 'เราพบว่าคำสัญญานี้มีความคลุมเครือและกำลังอยู่ในระหว่างการขอคำชี้แจงเพิ่มเติม' | ||
}, | ||
{ | ||
label: PromiseStatus.notStarted, | ||
text: 'เราไม่พบข้อมูลความเคลื่อนไหวที่เกี่ยวกับคำสัญญานี้' | ||
}, | ||
{ | ||
label: PromiseStatus.inProgress, | ||
text: 'เราพบข้อมูลความคืบหน้า แต่ยังไม่บรรลุเป้าหมายที่ได้สัญญาไว้' | ||
}, | ||
{ | ||
label: PromiseStatus.fulfilled, | ||
text: 'เราพบข้อมูลความคืบหน้า และข้อมูลที่ชี้ว่าได้บรรลุเป้าหมายที่ได้สัญญาไว้แล้ว' | ||
}, | ||
{ | ||
label: PromiseStatus.unhonored, | ||
text: 'เราพบข้อมูลความคืบหน้า ที่ชี้ว่ามีการเลิกดำเนินการเพื่อบรรลุเป้าหมายตามคำสัญญานี้แล้ว' | ||
} | ||
] as { label: PromiseStatus; text: string }[]; |
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