-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SampleDescription component (#5428)
- Loading branch information
Showing
26 changed files
with
520 additions
and
332 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
20 changes: 20 additions & 0 deletions
20
packages/samples/react/src/components/SampleDescription.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,20 @@ | ||
import React, { FC, PropsWithChildren, useContext } from 'react'; | ||
import { KolIndentedText, KolLink } from '@public-ui/react'; | ||
import { HideMenusContext } from '../shares/HideMenusContext'; | ||
|
||
export const SampleDescription: FC<PropsWithChildren> = (props) => { | ||
const hideMenus = useContext(HideMenusContext); | ||
|
||
return hideMenus ? null : ( | ||
<div className="flex"> | ||
<KolIndentedText>{props.children}</KolIndentedText> | ||
<KolLink | ||
_hideLabel | ||
_href={`${location.href}?hideMenus`} | ||
_label="Beispiel in neuem Tab öffnen" | ||
_target="_blank" | ||
className="mla flex-self-center" | ||
></KolLink> | ||
</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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { createContext } from 'react'; | ||
|
||
export const HideMenusContext = createContext<boolean | null>(null); |
Binary file modified
BIN
-12.9 KB
(69%)
.../bmf/snapshots/theme-bmf/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-11.7 KB
(9.0%)
...s/themes/bmf/snapshots/theme-bmf/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-13.5 KB
(70%)
...zst/snapshots/theme-bzst/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12.4 KB
(8.5%)
...themes/bzst/snapshots/theme-bzst/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12.5 KB
(68%)
.../snapshots/theme-default/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-11.7 KB
(8.8%)
.../default/snapshots/theme-default/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-13.7 KB
(68%)
...l/snapshots/theme-ecl_ec/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12.4 KB
(8.0%)
...hemes/ecl/snapshots/theme-ecl_ec/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-13.8 KB
(70%)
...l/snapshots/theme-ecl_eu/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12.5 KB
(8.9%)
...hemes/ecl/snapshots/theme-ecl_eu/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-13 KB
(68%)
.../snapshots/theme-itzbund/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-11.9 KB
(8.4%)
.../itzbund/snapshots/theme-itzbund/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.86 KB
(94%)
...themes/mfm/snapshots/theme-mfm/snapshot-for-input-file-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12.5 KB
(69%)
.../mfm/snapshots/theme-mfm/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-11.7 KB
(9.0%)
...s/themes/mfm/snapshots/theme-mfm/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-13 KB
(69%)
...oll/snapshots/theme-mapz/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.58 KB
(98%)
...s/themes/zoll/snapshots/theme-mapz/snapshot-for-select-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-11.9 KB
(9.7%)
...themes/zoll/snapshots/theme-mapz/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-13 KB
(70%)
...l/snapshots/theme-zollv2/snapshot-for-input-radio-horizontal-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-11.9 KB
(9.7%)
...emes/zoll/snapshots/theme-zollv2/snapshot-for-skip-nav-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.