Skip to content

Commit

Permalink
fix: note css
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Nov 3, 2023
1 parent c133fde commit 28df46e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ Here's some of them added and can be easily added:
</Note>
```

Types available: `success`,`warning`,`error`, `white`

---

#### 2. Code
Expand Down Expand Up @@ -181,7 +183,7 @@ All CSS Variables prefixed with `token` control the Syntax Highlighting.

## #️⃣ Viewing updated release versions on local before pushing changes

- To view the updated release version on local after adding changelog, run the following command before starting the local server:
- To view the updated release version on local after adding changelog, run the following command before starting the local server:
- `yarn updatereleases`
- `yarn dev`

Expand Down
5 changes: 2 additions & 3 deletions components/Note.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const Note: React.FC<Props> = ({ type = 'success', title = '', children }) => {
fontWeight: '500',
fontSize: '13px',
paddingBottom: '4px',
lineHeight: '24px',
color: resolveColor()
}}>
{title}
Expand All @@ -31,9 +32,7 @@ const Note: React.FC<Props> = ({ type = 'success', title = '', children }) => {
padding-left: 20px;
background: var(--docs_bg_card);
margin: 24px 0;
border-radius: var(--docs_border_radius_s);
border 1px solid var(--docs_border_strong);
border-left: 8px solid ${resolveColor()};
border-left: 4px solid ${resolveColor()};
}
`}</style>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Session store is a shared realtime key-value store that is accessible by everyon

The session store persists throughout the session and is cleared when the last peer leaves the room.

<Note>
💡 Session Store vs Peer Metadata
<Note title="💡 Session Store vs Peer Metadata">

While peer metadata is associated with individual peers and each peer can have their own metadata, session store remains the same for every peer in the room.

Expand All @@ -32,7 +31,6 @@ fun updateSessionStore(data: Any?, key : String, hmsActionResultListener: HMSAct
}
```


</Tab>

<Tab id='sessionstoreset-1'>
Expand Down Expand Up @@ -73,11 +71,11 @@ sessionStore.addKeyChangeListener(listOf("time","cat","cats"), object : HMSKeyCh
val cat : Cat = Gson().fromJson(value as JsonElement, Cat::class.java)
}
// Lists of objects
"cats" -> {
"cats" -> {
val type = TypeToken.getParameterized(List::class.java, Cat::class.java).type

if(value !=null && key == catKey)
val cats: List<Cats> = Gson().fromJson(value, type)
val cats: List<Cats> = Gson().fromJson(value, type)
}
}
}
Expand All @@ -89,7 +87,6 @@ sessionStore.addKeyChangeListener(listOf("time","cat","cats"), object : HMSKeyCh
)
```


</Tab>

<Tab id='sessionstoreget-1'>
Expand Down Expand Up @@ -152,7 +149,6 @@ Use the `get(key : String, listener: HMSSessionMetadataListener)` API if your ap

<Tab id='sessionstoresingle-0'>


```kotlin
sessionStore.get("mykey", object : HMSSessionMetadataListener {
override fun onSuccess(sessionMetadata: JsonElement?) {
Expand Down Expand Up @@ -188,6 +184,7 @@ sessionStore.get("mykey",new HMSSessionMetadataListener(){

});
```

</Tab>

## Limitations and workarounds in Alpha release
Expand All @@ -199,6 +196,6 @@ sessionStore.get("mykey",new HMSSessionMetadataListener(){

## Limits

- Max payload size for data can be 1KB.
- Maximum 100 keys are supported with 64KB limit applied to all keys combined.
- Metadata size for 64 KB also include the key size.
- Max payload size for data can be 1KB.
- Maximum 100 keys are supported with 64KB limit applied to all keys combined.
- Metadata size for 64 KB also include the key size.
1 change: 1 addition & 0 deletions styles/spacing.css
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ article .note+p {

article .note p {
margin-top: 0 !important;
font-size: 13px;
}

/* List Spacing */
Expand Down

0 comments on commit 28df46e

Please sign in to comment.