Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (...args: A): string => {
// Create a key by joining all args.
const key = args.join('_') || '__no_args__'
// Check if is already memoized, if so return the result.
if (memo[key]) return memo[key]
// Create a new entry in the memo with the generated className.
memo[key] = css(fn(...args)).toString()
// Return the newly generated className.
return memo[key]
}
}
return (...args) => {
// Creat a key by joining all args.
const key = args.join('_')
// Check if is already memoized, if so return the result.
if (memo[key]) return memo[key]
// Creat a new entry in the memo with the generated className.
memo[key] = css(fn(...args)).toString()
// Return the newly generated className.
return memo[key]
}
}
function glamorize(literalNodePath) {
let obj
const {code} = babel.transformFromAst(
t.program([t.expressionStatement(toLiteral(literalNodePath))]),
)
// eslint-disable-next-line no-eval
eval(`obj = ${code}`)
const className = glamor.css(obj).toString()
return className
}
})
export const Interaction = ({ children, large, medium, small }) => {
const sizedStyle = css(
styles.interaction,
sansSerifSizes.default,
(large && sansSerifSizes.large) ||
(medium && sansSerifSizes.medium) ||
(small && sansSerifSizes.small) ||
{}
)
return (
<h1>
{children}
</h1>
)
}
function Page ({
disabled,
selected,
...props
}) {
props.className = css(
classes.page,
!!disabled && classes.disabled,
!!selected && classes.selected
);
return (
<button>
);
};
</button>
function Container ({
className,
clearFloatingChildren,
component: Component,
width,
...props
}) {
props.className = css(
classes.container,
classes[width],
clearFloatingChildren ? classes.clearfix : null,
className
);
return ;
};
function ModalFooter ({
align,
className,
...props
}) {
return (
<div>
);
};
</div>
function Spinner ({ className, size, color, ...props }) {
props.className = css(
classes.base,
classes[size],
className
);
return (
<div>
<span>
<span>
<span>
Loading...
</span></span></span></div>
);
};
aboveTheFold,
feuilleton
}) => {
const background = bgColor || ''
const flexDirection = reverse ? 'row-reverse' : ''
const bylinePosition = feuilleton
? 'belowFeuilleton'
: portrait
? reverse
? 'left'
: 'right'
: 'below'
return (
<div style="{{">
<div></div></div>
const tileStyle = merge(
styles.tile,
{
border: outline ? `1px solid ${outline}` : 'none',
color,
backgroundColor: bgColor,
cursor: onClick ? 'pointer' : 'default',
padding: bigger ? '0 0 20px 0' : '30px 15px',
alignItems: bigger ? 'flex-start' : 'center'
},
context.tileCount < 3 && { width: `${100 / context.tileCount}%` },
context.tileMaxWidth && { maxWidth: context.tileMaxWidth }
)
const containerStyle = css(styles.container, {
margin: bigger ? '0' : '0 auto'
})
const imageProps = image && FigureImage.utils.getResizedSrcs(image, 450, true)
const imageContainerStyles = bigger
? styles.imageContainerBigger
: styles.imageContainer
const imageStyles = bigger ? styles.imageBigger : styles.image
const isPortrait =
imageProps &&
imageProps.size &&
imageProps.size.width / imageProps.size.height <= 1
? true
: false