@sankei-arc-shared-components/element_conditional-wrapper
v0.2.1
Published
Sankei Conditionl Wrapper Component
Downloads
91
Readme
Feature - Conditional Wrapper
How do I use it in my Fusion Project?
import {
ConditionalWrapper,
} from '@sankei-arc-shared-components/feature_conditional-wrapper';
... some code
const day = new Date().getDay();
const isMonday = day === 1;
<ConditionalWrapper condition={isMonday} ElementType="a" href="https://youtu.be/dQw4w9WgXcQ?t=43">
Hey! Today is monday! You can click me for a surprise =D
</ConditionalWrapper>
more code ...
Take a look in the src/index.mdx
file to see suggested implementations.