forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Permissions statement rendering on automated pages (github#33718)
- Loading branch information
Showing
9 changed files
with
43 additions
and
14 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
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
3 changes: 3 additions & 0 deletions
3
components/ui/PermissionsStatement/PermissionsStatement.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,3 @@ | ||
.permissions_statement { | ||
border-left: 5px solid var(--color-border-muted); | ||
} |
22 changes: 22 additions & 0 deletions
22
components/ui/PermissionsStatement/PermissionsStatement.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,22 @@ | ||
import cx from 'classnames' | ||
|
||
import styles from './PermissionsStatement.module.scss' | ||
import { useTranslation } from 'components/hooks/useTranslation' | ||
|
||
type Props = { | ||
permissions: string | ||
} | ||
|
||
export function PermissionsStatement({ permissions }: Props) { | ||
const { t } = useTranslation('pages') | ||
return ( | ||
<div | ||
className={cx(styles.permissions_statement, 'pl-3 my-4')} | ||
data-search="hide" | ||
data-testid="permissions-statement" | ||
> | ||
<div className="text-bold pr-2">{t('permissions_statement')}</div> | ||
<div dangerouslySetInnerHTML={{ __html: permissions }} /> | ||
</div> | ||
) | ||
} |
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 @@ | ||
export { PermissionsStatement } from './PermissionsStatement' |
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 |
---|---|---|
|
@@ -38,7 +38,3 @@ | |
.warning { | ||
font-weight: normal; | ||
} | ||
|
||
.permissions-statement { | ||
border-left: 5px solid var(--color-border-muted); | ||
} |
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