Skip to content

Commit 819c076

Browse files
committed
revert export of theme object since it was breaking inference
1 parent a15c24f commit 819c076

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

packages/@react-spectrum/s2/style/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {Inset, fontRelative as internalFontRelative, size as internalSize, space
1515
import type {MacroContext} from '@parcel/macros';
1616
import {StyleString} from './types';
1717

18-
export {baseColor, color, edgeToText, lightDark, linearGradient, colorMix, style, themeConfig} from './spectrum-theme';
18+
export {baseColor, color, edgeToText, lightDark, linearGradient, colorMix, style} from './spectrum-theme';
1919
export type {StyleString} from './types';
2020

2121
// Wrap these functions in arbitrary value syntax when called from the outside.

packages/@react-spectrum/s2/style/spectrum-theme.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ const minFontSize = 10;
535535
const maxFontSize = 32;
536536
const lineHeightCalc = `round(1em * (${minFontScale} + (1 - ((min(${maxFontSize}, ${fontSizeCalc}) - ${minFontSize})) / ${maxFontSize - minFontSize}) * ${(maxFontScale - minFontScale).toFixed(2)}), 2px)`;
537537

538-
export const themeConfig = {
538+
export const style = createTheme({
539539
properties: {
540540
// colors
541541
color: new SpectrumColorProperty('color', {
@@ -1044,6 +1044,4 @@ export const themeConfig = {
10441044
xl: `@media (min-width: ${pxToRem(1280)})`,
10451045
'2xl': `@media (min-width: ${pxToRem(1536)})`
10461046
}
1047-
} as const;
1048-
1049-
export const style = createTheme(themeConfig);
1047+
});

packages/dev/s2-docs/src/styleProperties.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const sizingProperties = new Set([
3434
// manually defined
3535
const propertyValues: {[key: string]: string[]} = {
3636
display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'grid', 'inline-grid', 'contents', 'list-item', 'none'],
37-
// TODO: this doesn't actually seem to reflect the actual usage?
3837
top: ['0', '2', '4', '8', '12', '16', '20', '24', '28', '32', '36', '40', '44', '48', '56', '64', '80', '96', '-2', '-4', '-8', '-12', '-16', '-20', '-24', '-28', '-32', '-36', '-40', '-44', '-48', '-56', '-64', '-80', '-96', 'auto', 'full'],
3938
height: ['auto', 'full', 'min', 'max', 'fit', 'screen']
4039
};

0 commit comments

Comments
 (0)