-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rebrand ProposalStatusPill (#1948)
* refactor: rebrand ProposalStatusPill * Update packages/desktop/views/governance/components/ProposalStatusPill.svelte Co-authored-by: Mark Nardi <[email protected]> --------- Co-authored-by: Mark Nardi <[email protected]>
- Loading branch information
1 parent
20f3755
commit 0a8c26f
Showing
6 changed files
with
34 additions
and
37 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
3 changes: 2 additions & 1 deletion
3
packages/desktop/views/governance/components/ProposalStatusInfo.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
29 changes: 29 additions & 0 deletions
29
packages/desktop/views/governance/components/ProposalStatusPill.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,29 @@ | ||
<script lang="ts"> | ||
import { EventStatus } from '@iota/sdk/out/types' | ||
import { COLOR_PALETTE, Icon, IconName, Pill, Text } from '@bloomwalletio/ui' | ||
import { localize } from '@core/i18n' | ||
import { IProposal } from '@contexts/governance/interfaces' | ||
export let proposal: IProposal | ||
$: status = proposal?.status | ||
$: error = proposal?.error | ||
const STATUS_COLORS: Record<EventStatus, keyof typeof COLOR_PALETTE> = { | ||
[EventStatus.Upcoming]: 'yellow', | ||
[EventStatus.Commencing]: 'blue', | ||
[EventStatus.Holding]: 'teal', | ||
[EventStatus.Ended]: 'neutral', | ||
} | ||
</script> | ||
|
||
{#if status} | ||
<Pill color={STATUS_COLORS[status]}> | ||
<div class="flex flex-row space-x-1 items-center"> | ||
{#if error} | ||
<Icon name={IconName.CrossClose} textColor="danger" size="xs" /> | ||
{/if} | ||
<Text textColor="current">{localize(`pills.governance.proposalStatus.${error ? error : status}`)}</Text> | ||
</div> | ||
</Pill> | ||
{/if} |
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,2 @@ | ||
export { default as ProposalStatusPill } from './ProposalStatusPill.svelte' | ||
export { default as ProposalStatusInfo } from './ProposalStatusInfo.svelte' |
34 changes: 0 additions & 34 deletions
34
packages/shared/src/components/pills/ProposalStatusPill.svelte
This file was deleted.
Oops, something went wrong.
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