Skip to content

Commit

Permalink
fix(sdk): invite modal crash (#675)
Browse files Browse the repository at this point in the history
* chore: update apsara version

* chore: remove Select.Label component
  • Loading branch information
rsbh authored Jul 17, 2024
1 parent 82de892 commit 77b2f04
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion sdks/js/packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},
"dependencies": {
"@hookform/resolvers": "^3.3.1",
"@raystack/apsara": "^0.16.0",
"@raystack/apsara": "^0.16.2",
"@tanstack/react-router": "0.0.1-beta.194",
"axios": "^1.5.0",
"class-variance-authority": "^0.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,9 @@ export const InviteMember = () => {
>
<Select.Group>
{!roles.length && (
<Select.Label
style={{ color: 'var(--foreground-base)' }}
>
<Text className={styles.noSelectItem}>
No roles available
</Select.Label>
</Text>
)}
{roles.map(role => (
<Select.Item value={role.id} key={role.id}>
Expand Down Expand Up @@ -250,11 +248,9 @@ export const InviteMember = () => {
>
<Select.Group>
{!teams.length && (
<Select.Label
style={{ color: 'var(--foreground-base)' }}
>
<Text className={styles.noSelectItem}>
No teams available
</Select.Label>
</Text>
)}
{teams.map(t => (
<Select.Item value={t.id} key={t.id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@
background: var(--background-base-hover);
color: var(--foreground-base);
}

.noSelectItem {
color: var(--foreground-muted);
padding: var(--pd-8);
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,9 @@ export const InviteTeamMembers = () => {
<Select.Viewport style={{ maxHeight: '300px' }}>
<Select.Group>
{!invitableUser.length && (
<Select.Label
style={{ color: 'var(--foreground-base)' }}
>
<Text className={styles.noSelectItem}>
No member to invite
</Select.Label>
</Text>
)}
{invitableUser.map(user => (
<Select.Item value={user.id} key={user.id}>
Expand Down Expand Up @@ -257,11 +255,9 @@ export const InviteTeamMembers = () => {
>
<Select.Group>
{!roles.length && (
<Select.Label
style={{ color: 'var(--foreground-base)' }}
>
<Text className={styles.noSelectItem}>
No roles available
</Select.Label>
</Text>
)}
{roles.map(role => (
<Select.Item value={role.id} key={role.id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@
.inviteDropdownItem:hover {
background-color: var(--background-base-hover);
}

.noSelectItem {
color: var(--foreground-muted);
padding: var(--pd-8);
}
12 changes: 6 additions & 6 deletions sdks/js/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 77b2f04

Please sign in to comment.