diff --git a/README.md b/README.md index 00a54b3..2b3b391 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,20 @@ const App = () => { }; ``` +## The `as` attribute + +The Box Component is the primitive component that allows you to access the sx property. By default it renders a div html element. +It accepts a `as` attribute to choose the needed tag. + +```javascript + + My link + +``` + +> Of course, the href attribute type is well inferred from the "`a`" tag. +> And it works for all tags and Components ! + ## Reusable components Components often need to be reusable and easily customisable with the sx property overriding. diff --git a/packages/lib/README.md b/packages/lib/README.md index b9f4f60..2b3b391 100644 --- a/packages/lib/README.md +++ b/packages/lib/README.md @@ -1,4 +1,5 @@ -# Sx-machine +

Sx-machine

+

First class Sx property for React.

## Sx-machine is a lightweight library that provides a Box component for React and its themed SX property. @@ -74,6 +75,20 @@ const App = () => { }; ``` +## The `as` attribute + +The Box Component is the primitive component that allows you to access the sx property. By default it renders a div html element. +It accepts a `as` attribute to choose the needed tag. + +```javascript + + My link + +``` + +> Of course, the href attribute type is well inferred from the "`a`" tag. +> And it works for all tags and Components ! + ## Reusable components Components often need to be reusable and easily customisable with the sx property overriding. diff --git a/packages/lib/package.json b/packages/lib/package.json index c4e09ac..8ab2e07 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -6,7 +6,7 @@ "types": "./dist/index.d.ts", "type": "module", "packageManager": "yarn@3.2.1", - "version": "1.0.8", + "version": "1.0.10", "scripts": { "dev": "run-p --continue-on-error watch:source watch:types", "watch:types": "npx tsc -w",