Skip to content

Commit

Permalink
add test package
Browse files Browse the repository at this point in the history
  • Loading branch information
hadihallak authored and jonathantneal committed Aug 12, 2021
1 parent a23e077 commit f41aab6
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"workspaces": [
"packages/core",
"packages/react",
"packages/test",
"packages/stringify"
],
"dependencies": {
Expand Down
35 changes: 35 additions & 0 deletions packages/test/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import * as Stitches from '@stitches/react'
import * as React from 'react'


const { css, config, styled } = Stitches.createStitches({
utils: {
/** util to do stuff */
ms: (marginX: number) => ({ marginLeft: marginX }),
},
theme: {
colors: {
red100: '#ff0000',
},
},
themeMap: { ...Stitches.defaultThemeMap },
})

const StyledStatus = Stitches.styled('span', {
color: 'red',
variants: {
mySize: {
myLarge: {},
},
},
})

export const Status: React.ForwardRefExoticComponent<React.ComponentProps<typeof StyledStatus>> = React.forwardRef(
(props, forwardedRef) => {
return <StyledStatus aria-hidden {...props} ref={forwardedRef} />
}
)

export default function Home() {
return <Status onClick={event => { }} />
}
58 changes: 58 additions & 0 deletions packages/test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "@stitches/test",
"version": "1.0.0-canary.7",
"description": "The modern CSS-in-JS library",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "types/index.d.ts",
"typesVersions": {
">= 4.1": {
"*": [
"types/index.d.ts"
]
}
},
"jsdelivr": "dist/index.global.js",
"unpkg": "dist/index.global.js",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.mjs",
"types": "./types/index.d.ts"
},
"./global": "./dist/index.global.js"
},
"files": [
"dist/*.cjs",
"dist/*.js",
"dist/*.map",
"dist/*.mjs",
"types/*.d.ts"
],
"sideEffects": false,
"license": "MIT",
"repository": "modulz/stitches",
"homepage": "https://github.com/modulz/stitches#readme",
"bugs": "https://github.com/modulz/stitches/issues",
"contributors": [
"Pedro Duarte <pedro@modulz.app>",
"Abdulhadi Alhallak <abdulhadi@modulz.app>",
"Jonathan Neal <jonathan@modulz.app>"
],
"devDependencies": {
"@stitches/react": "^1.0.0-canary.7",
"react": "17.0.2"
},
"peerDependencies": {
"react": ">= 16.3.0"
},
"publishConfig": {
"access": "public"
},
"eslintConfig": {
"extends": [
"react-app"
]
}
}

0 comments on commit f41aab6

Please sign in to comment.