Skip to content

Commit

Permalink
feat: re-export spectrum useStyleProp util (#1916)
Browse files Browse the repository at this point in the history
`useStyleProp` takes common spectrum style props and resolves them to
values. In my case I need the resolved version of a dimensionValue
("size-100") as var(--XXX), and things like paddingY resolved as
paddingTop, paddingBottom for use externally in dh.ui.
  • Loading branch information
dsmmcken authored Apr 4, 2024
1 parent c7fcd38 commit aafa14b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@react-spectrum/theme-default": "^3.5.1",
"@react-spectrum/utils": "^3.11.5",
"@react-types/shared": "^3.22.1",
"@react-types/textfield": "^3.9.1",
"bootstrap": "4.6.2",
Expand Down
6 changes: 6 additions & 0 deletions packages/components/src/spectrum/utils/themeUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { theme } from '@react-spectrum/theme-default';
import { themeSpectrumClassesCommon } from '../../theme/theme-spectrum';

export {
useStyleProps,
baseStyleProps,
viewStyleProps,
} from '@react-spectrum/utils';

const { global, light, dark, medium, large } = theme;

/**
Expand Down

0 comments on commit aafa14b

Please sign in to comment.