Skip to content

Commit a02b805

Browse files
committed
feat(ui-pill): migrate to new theming system
1 parent 907f7bb commit a02b805

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

docs/guides/upgrade-guide.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,37 @@ The new icons automatically sync with theme changes, support all InstUI color to
7676
- `alert` color has been removed. Please use `primary` instead.
7777
- Some prop values have been deprecated, see [Text](/Text) for more details.
7878

79+
### Pill
80+
81+
#### Deprecated color prop values
82+
83+
The following `color` prop values have been **removed**:
84+
85+
- `'danger'` - use `'error'` instead
86+
- `'alert'` - use `'info'` instead
87+
88+
#### Theme variable changes
89+
90+
- theme variable `fontFamily` has been added
91+
- theme variable `padding` has been renamed to `paddingHorizontal` (now only controls horizontal padding)
92+
- theme variable `background` has been renamed to `backgroundColor`
93+
- theme variable `primaryColor` has been split into:
94+
- `baseTextColor` (for text color)
95+
- `baseBorderColor` (for border color)
96+
- theme variable `successColor` has been split into:
97+
- `successTextColor` (for text color)
98+
- `successBorderColor` (for border color)
99+
- theme variable `infoColor` has been split into:
100+
- `infoTextColor` (for text color)
101+
- `infoBorderColor` (for border color)
102+
- theme variable `warningColor` has been split into:
103+
- `warningTextColor` (for text color)
104+
- `warningBorderColor` (for border color)
105+
- theme variable `dangerColor` has been removed, replaced with:
106+
- `errorTextColor` (for text color)
107+
- `errorBorderColor` (for border color)
108+
- theme variable `alertColor` has been removed (use `info*` variables instead)
109+
79110
## API Changes
80111

81112
### RadioInput

packages/ui-pill/src/Pill/styles.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ const generateStyle = (
7474
padding: `0 ${componentTheme.paddingHorizontal}`,
7575
background: componentTheme.backgroundColor,
7676
borderWidth: componentTheme.borderWidth,
77-
borderStyle: componentTheme.borderStyle.style,
77+
borderStyle: componentTheme.borderStyle,
7878
borderRadius: componentTheme.borderRadius,
79+
fontFamily: componentTheme.fontFamily,
7980
/* line-height does not account for top/bottom border width */
8081
lineHeight: `calc(${componentTheme.height} - (${componentTheme.borderWidth} * 2))`,
8182
...pillColorVariants[color!]

0 commit comments

Comments
 (0)