Skip to content

Commit

Permalink
add to other components too
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Jan 13, 2025
1 parent 8ee60ee commit f4480e7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/components/control.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ interface Props {
tag?: string
type?: Type
mode?: Mode
icon?: any
icon?: Component
iconMode?: Mode
label?: string
labelMode?: Mode
Expand Down Expand Up @@ -204,7 +204,7 @@ import SButton, {

interface Props {
as?: string
icon?: any
icon?: Component
href?: string
disabled?: boolean
tooltip?: string | Tooltip
Expand Down
4 changes: 2 additions & 2 deletions docs/components/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export interface TableCellText {
align?: 'left' | 'center' | 'right'

// Icon to display in front of the value.
icon?: any
icon?: Component

// The value for the cell. If omitted, it will use the value
// from the record.
Expand Down Expand Up @@ -432,7 +432,7 @@ export interface TableCellNumber {
align?: 'left' | 'center' | 'right'

// Icon to display in front of the value.
icon?: any
icon?: Component

// The value for the cell. If omitted, it will use the value
// from the record.
Expand Down
3 changes: 2 additions & 1 deletion lib/components/SControlActionBarButton.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script setup lang="ts">
import { type Component } from 'vue'
import { useControlSize } from '../composables/Control'
import SButton, { type Tooltip } from './SButton.vue'
defineProps<{
as?: string
icon?: any
icon?: Component
href?: string
disabled?: boolean
tooltip?: string | Tooltip
Expand Down
7 changes: 6 additions & 1 deletion lib/components/SControlButton.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<script setup lang="ts">
import { type Component } from 'vue'
import { useControlSize } from '../composables/Control'
import SButton, { type Mode, type Tooltip, type Type } from './SButton.vue'
defineProps<{
tag?: string
type?: Type
mode?: Mode
icon?: any
icon?: Component
leadIcon?: Component
trailIcon?: Component
iconMode?: Mode
label?: string
labelMode?: Mode
Expand All @@ -31,6 +34,8 @@ const size = useControlSize()
:type="type"
:mode="mode"
:icon="icon"
:lead-icon="leadIcon"
:trail-icon="trailIcon"
:icon-mode="iconMode"
:label="label"
:label-mode="labelMode"
Expand Down
6 changes: 3 additions & 3 deletions lib/composables/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export interface TableCellBase {
export interface TableCellText<V = any, R = any> extends TableCellBase {
type: 'text'
align?: 'left' | 'center' | 'right'
icon?: any
icon?: Component
value?: string | null
link?: string | null
color?: TableCellValueColor
Expand All @@ -107,7 +107,7 @@ export interface TableCellText<V = any, R = any> extends TableCellBase {
export interface TableCellNumber<V = any, R = any> extends TableCellBase {
type: 'number'
align?: 'left' | 'center' | 'right'
icon?: any
icon?: Component
value?: number | null
separator?: boolean
link?: string | null
Expand Down Expand Up @@ -194,7 +194,7 @@ export interface TableCellActions<R = any> extends TableCellBase {

export interface TableCellAction<R = any> {
mode?: Mode
icon?: any
icon?: Component
iconMode?: Mode
label?: string
labelMode?: Mode
Expand Down

0 comments on commit f4480e7

Please sign in to comment.