mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +02:00
8295bd6882
this shall be a progressive process
14 lines
506 B
JavaScript
14 lines
506 B
JavaScript
import { css } from 'styled-components';
|
|
|
|
export default (...names) => (...args) => props =>
|
|
names.every(name => props[name]) ? css(...args) : css``;
|
|
|
|
export const isNot = (...names) => (...args) => props =>
|
|
names.every(name => !props[name]) ? css(...args) : css``;
|
|
|
|
export const isOr = (...names) => (...args) => props =>
|
|
names.some(name => props[name]) ? css(...args) : css``;
|
|
|
|
export const isSomeNot = (...names) => (...args) => props =>
|
|
names.some(name => !props[name]) ? css(...args) : css``;
|