Skip to content

Commit 7def730

Browse files
committed
docs: update UsercentricsScript component JSDoc
1 parent b7c54a5 commit 7def730

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 S Group
3+
Copyright (c) 2023 S Group
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,20 @@ The script tag that loads the Usercentrics Browser UI and API.
8989
interface UsercentricsScriptProps
9090
extends React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement> {
9191
settingsId: string
92+
/**
93+
* The specific version of Usercentrics UI to load instead of "latest", as a string value
94+
*
95+
* @default "latest"
96+
* @example "3.21.1"
97+
* @see https://releases.usercentrics.com/en?category=browser+ui&role=cmpv1%3Bcmpv2%3B
98+
*/
9299
uiVersion?: string
100+
/**
101+
* Whether to run Usercentrics in "production" or "preview" mode
102+
* @default "production"
103+
*/
93104
version?: 'production' | 'preview'
105+
src?: never
94106
}
95107

96108
/** Default production mode */

src/components/UsercentricsScript.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@ import React from 'react'
44
interface UsercentricsScriptProps
55
extends React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement> {
66
settingsId: string
7+
/**
8+
* The specific version of Usercentrics UI to load instead of "latest", as a string value
9+
*
10+
* @default "latest"
11+
* @example "3.21.1"
12+
* @see https://releases.usercentrics.com/en?category=browser+ui&role=cmpv1%3Bcmpv2%3B
13+
*/
714
uiVersion?: string
15+
/**
16+
* Whether to run Usercentrics in "production" or "preview" mode
17+
* @default "production"
18+
*/
819
version?: 'production' | 'preview'
920
src?: never
1021
}
1122

1223
/**
13-
* The script tag that loads the Usercentrics Browser API.
24+
* The script tag that loads the Usercentrics Browser UI & API.
1425
*
1526
* @example <caption>Default production mode</caption>
1627
* () => <UsercentricsScript settingsId="1234" />

0 commit comments

Comments
 (0)