File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/custom-properties Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 16
16
"access" : " public"
17
17
},
18
18
"dependencies" : {
19
+ "@theme-ui/core" : " ^0.3.1" ,
19
20
"pluralize" : " ^8.0.0"
20
21
},
21
22
"devDependencies" : {
Original file line number Diff line number Diff line change 1
1
import pluralize from 'pluralize'
2
+ import { Theme } from '@theme-ui/core/dist/theme'
2
3
3
- export default ( theme , prefix ) => {
4
- const customProperties = { }
4
+ interface CustomProperties {
5
+ [ key : string ] : string | number
6
+ }
7
+
8
+ export default ( theme : Theme , prefix ?: string ) => {
9
+ const customProperties : CustomProperties = { }
5
10
6
- const generateProperties = ( object , previousKey ) => {
11
+ const generateProperties = ( object : object , previousKey ?: string ) => {
7
12
Object . entries ( object ) . forEach ( ( [ key , value ] ) => {
8
13
let formattedKey = pluralize ( key , 1 )
9
14
You can’t perform that action at this time.
0 commit comments