mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
StyleguidePage: add rawOnly flag for positioned components
This commit is contained in:
parent
622dfa18ca
commit
926e68f854
1 changed files with 15 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ const Example = props => {
|
|||
description,
|
||||
props: exampleProps,
|
||||
useDefaultWrapperStyles,
|
||||
rawOnly,
|
||||
} = props;
|
||||
|
||||
const exampleWrapperClassName = useDefaultWrapperStyles ? css.defaultWrapperStyles : '';
|
||||
|
|
@ -51,7 +52,20 @@ const Example = props => {
|
|||
</span>
|
||||
{desc}
|
||||
<div className={exampleWrapperClassName}>
|
||||
<ExampleComponent {...exampleProps} />
|
||||
{rawOnly ? (
|
||||
<p>
|
||||
This component is available in{' '}
|
||||
<NamedLink
|
||||
name="StyleguideComponentExampleRaw"
|
||||
params={{ component: componentName, example: exampleName }}
|
||||
>
|
||||
raw mode
|
||||
</NamedLink>{' '}
|
||||
only.
|
||||
</p>
|
||||
) : (
|
||||
<ExampleComponent {...exampleProps} />
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue