Skip to content

Commit

Permalink
released 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
flodlc committed Nov 14, 2022
1 parent b83b6e5 commit 1509afe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions packages/lib/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Themebox
# Sx-machine

### themebox is a lightweight library that provides tools for theming.

Expand Down Expand Up @@ -47,8 +47,12 @@ const Exemple = () => {
Themebox provides a powerful theming feature.
The default theme includes spaces and breakpoints.

> ### $ prefix
>
> It's recommanded to use $ prefixed theme keys to help differenciate theme values from native CSS values
```javascript
import { defaultTheme } from 'themebox';
import { defaultTheme } from 'sx-machine';

const theme = {
...defaultTheme,
Expand All @@ -75,21 +79,18 @@ Let's create a generic Button !

```javascript
// Button.tsx
import { createGenericComponent } from 'sx-machine';

type Button = GenericComponent<
'div',
const Button: Button = createGenericComponent<'div',
{
children?: React.ReactNode,
}
>;

const Button: Button = ({ children, sx, ...props }) => {
}>(({ children, sx, ...props }) => {
return (
<Box sx={[{ bg: 'green', px: 4, py: 2 }, sx]} {...props}>
{children}
</Box>
);
};
});
```

```javascript
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "./dist/index.d.ts",
"type": "module",
"packageManager": "[email protected]",
"version": "1.0.2",
"version": "1.0.3",
"scripts": {
"dev": "run-p --continue-on-error watch:source watch:types",
"watch:types": "npx tsc -w",
Expand Down

0 comments on commit 1509afe

Please sign in to comment.