add xsmall size variant to segmented control
This commit is contained in:
parent
cc58e8e1b1
commit
135146d1ee
3 changed files with 13 additions and 2 deletions
|
|
@ -35,7 +35,8 @@
|
|||
// Apply size-specific classes
|
||||
const sizeClasses = {
|
||||
default: '',
|
||||
small: styles.small
|
||||
small: styles.small,
|
||||
xsmall: styles.xsmall
|
||||
}
|
||||
|
||||
// Apply element-specific classes
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
|
||||
export type SegmentedControlVariant = 'default' | 'blended' | 'background'
|
||||
export type SegmentedControlSize = 'default' | 'small'
|
||||
export type SegmentedControlSize = 'default' | 'small' | 'xsmall'
|
||||
|
||||
interface Props extends HTMLAttributes<HTMLDivElement> {
|
||||
value?: string
|
||||
|
|
|
|||
|
|
@ -39,6 +39,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Extra small size variant
|
||||
.xsmall {
|
||||
font-size: typography.$font-small;
|
||||
min-width: 60px;
|
||||
|
||||
.label {
|
||||
padding: spacing.$unit-half spacing.$unit;
|
||||
}
|
||||
}
|
||||
|
||||
// Grow variant - fill available space equally
|
||||
.grow {
|
||||
flex: 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue