Skip to content

Commit

Permalink
feat(table): add success color option to text cell
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed Nov 14, 2022
1 parent a7bca60 commit 9c611d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/components/STableCellText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type Color =
| 'soft'
| 'mute'
| 'info'
| 'success'
| 'warning'
| 'danger'
Expand Down Expand Up @@ -81,6 +82,7 @@ const _iconColor = computed(() => {
&.soft { color: var(--c-text-2); }
&.mute { color: var(--c-text-3); }
&.info { color: var(--c-info); }
&.success { color: var(--c-success); }
&.warning { color: var(--c-warning); }
&.danger { color: var(--c-danger); }
Expand All @@ -92,9 +94,11 @@ const _iconColor = computed(() => {
.STableCellText.link &.soft { color: var(--c-text-2); }
.STableCellText.link:hover &.soft { color: var(--c-info); }
.STableCellText.link &.mute { color: var(--c-text-3); }
.STableCellText.link:hover &.mute { color: var(--c-info); }
.STableCellText.link:hover &.mute { color: var(--c-text-3); }
.STableCellText.link &.info { color: var(--c-info); }
.STableCellText.link:hover &.info { color: var(--c-info-dark); }
.STableCellText.link &.success { color: var(--c-success); }
.STableCellText.link:hover &.success { color: var(--c-success-dark); }
.STableCellText.link &.warning { color: var(--c-warning); }
.STableCellText.link:hover &.warning { color: var(--c-warning-darker); }
.STableCellText.link &.danger { color: var(--c-danger); }
Expand Down Expand Up @@ -126,6 +130,8 @@ const _iconColor = computed(() => {
.STableCellText.link:hover &.mute { color: var(--c-info); }
.STableCellText.link &.info { color: var(--c-info); }
.STableCellText.link:hover &.info { color: var(--c-info-dark); }
.STableCellText.link &.success { color: var(--c-success); }
.STableCellText.link:hover &.success { color: var(--c-success-dark); }
.STableCellText.link &.warning { color: var(--c-warning); }
.STableCellText.link:hover &.warning { color: var(--c-warning-dark); }
.STableCellText.link &.danger { color: var(--c-danger); }
Expand Down
1 change: 1 addition & 0 deletions lib/composables/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type TableCellTextColor =
| 'soft'
| 'mute'
| 'info'
| 'success'
| 'warning'
| 'danger'

Expand Down

0 comments on commit 9c611d5

Please sign in to comment.