-
-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(console, phrases): update the supported webhook events
update the supported webhook events
- Loading branch information
Showing
21 changed files
with
387 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/console/src/ds-components/Checkbox/CategorizedCheckboxGroup/index.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@use '@/scss/underscore' as _; | ||
|
||
.groupTitle { | ||
font: var(--font-body-2); | ||
color: var(--color-text-secondary); | ||
margin-bottom: _.unit(2); | ||
} | ||
|
||
.groupList { | ||
// max two column | ||
gap: _.unit(5); | ||
display: grid; | ||
grid-template-columns: repeat(2, 1fr); | ||
} |
42 changes: 42 additions & 0 deletions
42
packages/console/src/ds-components/Checkbox/CategorizedCheckboxGroup/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { type AdminConsoleKey } from '@logto/phrases'; | ||
import classNames from 'classnames'; | ||
|
||
import DynamicT from '@/ds-components/DynamicT'; | ||
|
||
import CheckboxGroup, { type Option } from '../CheckboxGroup'; | ||
|
||
import * as styles from './index.module.scss'; | ||
|
||
export type CheckboxOptionGroup<T> = { | ||
title: AdminConsoleKey; | ||
options: Array<Option<T>>; | ||
}; | ||
|
||
type Props<T> = { | ||
readonly groups: Array<CheckboxOptionGroup<T>>; | ||
readonly value: T[]; | ||
readonly onChange: (value: T[]) => void; | ||
readonly className?: string; | ||
}; | ||
|
||
function CategorizedCheckboxGroup<T extends string>({ | ||
groups, | ||
value: checkedValues, | ||
onChange, | ||
className, | ||
}: Props<T>) { | ||
return ( | ||
<div className={classNames(styles.groupList, className)}> | ||
{groups.map(({ title, options }) => ( | ||
<div key={title}> | ||
<div className={styles.groupTitle}> | ||
<DynamicT forKey={title} /> | ||
</div> | ||
<CheckboxGroup options={options} value={checkedValues} onChange={onChange} /> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
export default CategorizedCheckboxGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.