diff --git a/packages/react/README.md b/packages/react/README.md new file mode 100644 index 0000000000..11f9718bb8 --- /dev/null +++ b/packages/react/README.md @@ -0,0 +1,22 @@ +# @digdir/design-system-react + +React components from the DigDir Common Designsystem + +## Installation + +```sh +npm install @digdir/design-system-react +``` + +If you use Typescript, make sure you have typescript >= 3.8 as a devDependency: + +```sh +npm install typescript --save-dev +``` + +## Usage + +```jsx +import '@altinn/figma-design-tokens/dist/tokens.css'; +import { Button } from '@digdir/design-system-react'; +``` diff --git a/packages/react/package.json b/packages/react/package.json index a4d1b836b9..358346b9ec 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -21,10 +21,15 @@ "@digdir/design-system-icons": "*" }, "peerDependencies": { - "react": "^18.1.0", - "react-dom": "^18.0.0" + "react": ">=16.8", + "react-dom": ">=16.8" }, "publishConfig": { "access": "public" + }, + "dependencies": { + "@altinn/figma-design-tokens": "^6.0.1", + "@navikt/ds-icons": "^2.3.0", + "react-number-format": "^5.1.3" } } diff --git a/yarn.lock b/yarn.lock index e38c191236..33880c081e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2671,6 +2671,11 @@ resolved "https://registry.yarnpkg.com/@navikt/ds-icons/-/ds-icons-2.1.6.tgz#9a7caae8f6c1696dc4199917d75c3043ade6cbae" integrity sha512-a6dwPPu3yAJTBB31kXS2OvFdVNUZNjaON2DiQkQppnfDZC82AdhCKE8/NEFaQ3dUZSmbEbGy/e1IHNpFI2kKRg== +"@navikt/ds-icons@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@navikt/ds-icons/-/ds-icons-2.3.0.tgz#badd0cf0a455548f8f403909cd888787c0834dc2" + integrity sha512-YJH5dqSxfJdGJOwj6AABQvcL+w2OHs+HoqqsDlGc1fG8/xP5e620UOIgRLD7HisS+dmE2t9OJESPjuI42agkCw== + "@next/env@13.0.7": version "13.0.7" resolved "https://registry.yarnpkg.com/@next/env/-/env-13.0.7.tgz#7b6ccd9006d3fb57c369e3fb62b28e15324141e9"